Thread
#compose
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    Am I the only one getting this?
    l

    Louis Pullen-Freilich [G]

    2 years ago
    Ah, sorry about this - this is a known issue in Studio with our setup in AndroidX. Instead of running / installing the demos from inside studio, you will need to install them from command line:
    ./gradlew ui:integration-tests:demos:installDebug
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    Will this apply to any other module(app) I’ll add to the project?
    l

    Louis Pullen-Freilich [G]

    2 years ago
    Yup, this is because we disable test coverage when running the gradle build from inside studio, and there is an issue with recent versions of AGP where this causes the exception you listed. Alternatively, you can locally just comment out this line in AndroidXPlugin.kt
    buildTypes.getByName("debug").isTestCoverageEnabled =
              !project.hasProperty("android.injected.invoked.from.ide")
    Although this may increase build times a bit, not sure
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    Getting this now 😛
    l

    Louis Pullen-Freilich [G]

    2 years ago
    When running from command line? Or inside studio?
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    command line
    Well, from AS terminal
    l

    Louis Pullen-Freilich [G]

    2 years ago
    Yeah, I think you need to open a new terminal entirely
    Since AS terminal will still (presumably) have the environment variable that considers it to be part of the IDE
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    Just tried, did not solve the problem
    l

    Louis Pullen-Freilich [G]

    2 years ago
    😕 that's strange, maybe try nuking the out directory first?
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    worked 😄
    l

    Louis Pullen-Freilich [G]

    2 years ago
    Out of interest, is there anywhere you checked first for this error? I'm wondering where a good place to put this kind of 'known issues' information is - is the README in the compose directory discoverable / an obvious place to check? Maybe a hotlist?
    Luca Nicoletti

    Luca Nicoletti

    2 years ago
    I tried checking in more detail the build log, but no, since I’m in
    repo
    I knew google wouldn’t help
    That would be a nice idea
    what about
    known-issues.md
    ?