https://kotlinlang.org logo
#compose
Title
# compose
l

Luca Nicoletti

11/01/2019, 3:51 PM
Am I the only one getting this?
l

Louis Pullen-Freilich [G]

11/01/2019, 4:08 PM
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
l

Luca Nicoletti

11/01/2019, 4:10 PM
Will this apply to any other module(app) I’ll add to the project?
l

Louis Pullen-Freilich [G]

11/01/2019, 4:14 PM
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
Copy code
buildTypes.getByName("debug").isTestCoverageEnabled =
          !project.hasProperty("android.injected.invoked.from.ide")
Although this may increase build times a bit, not sure
l

Luca Nicoletti

11/01/2019, 4:30 PM
Getting this now 😛
l

Louis Pullen-Freilich [G]

11/01/2019, 4:30 PM
When running from command line? Or inside studio?
l

Luca Nicoletti

11/01/2019, 4:30 PM
command line
Well, from AS terminal
l

Louis Pullen-Freilich [G]

11/01/2019, 4:31 PM
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
l

Luca Nicoletti

11/01/2019, 4:31 PM
Just tried, did not solve the problem
l

Louis Pullen-Freilich [G]

11/01/2019, 4:32 PM
😕 that's strange, maybe try nuking the out directory first?
l

Luca Nicoletti

11/01/2019, 4:36 PM
worked 😄
l

Louis Pullen-Freilich [G]

11/01/2019, 4:39 PM
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?
l

Luca Nicoletti

11/01/2019, 4:48 PM
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
?
5 Views