Reputation: 480
I have the latest version on Android studio (Giraffe) And I have built a very small app from the project wizard (the "empty activity" template) When I run the app several times consecutively, it starts in less than a second. If I change the code, the build + launch the app takes about 6 seconds (this is ok)
This template also has an instrumented test (very short to execute). Each time I launch the test (with run, not debug, and without changing the code)), it takes about 25 seconds before the test is executed
Here is the log:
> Task :app:dexBuilderDebugAndroidTest UP-TO-DATE
> Task :app:mergeProjectDexDebugAndroidTest UP-TO-DATE
> Task :app:packageDebugAndroidTest
> Task :app:createDebugAndroidTestApkListingFileRedirect UP-TO-DATE
> Task :app:connectedDebugAndroidTest
Starting 1 tests on ...
BUILD SUCCESSFUL in 29s
The build is almost instantaneous up to the createDebugAndroidTestApkListingFileRedirect task. Then it takes about 25 sec to just start the test
Why is is so long (as there is no code change between launches) ? Is there a way to reduce this build time?
Upvotes: 2
Views: 307