I migrated yesterday to Android Studio 5.x from Eclipse. It's nice.
However when I run the app to compile and install it into my phone it takes more time than eclipse.
I click run, and it starts making the app. The tasks say: Grandle: Executing tasks [:mypackage:assembleDebug]
. Upon completion is says Grandle invocation completed successfully in x min x sec
. Then it loads it.
The problem is that it sometimes might take just 20seconds but other times 2-3 minutes. Which is annoying waiting time. Is this execution necessary to have it always run before each compiling? Can I close it or reduce its time?
I'm sorry if this question is not accurate but I'm not familiar how grandle fully works in AS.
Enable build caching For example, ./gradlew assembleDebug --build-cache . You can also configure build caching on your gradle. properties file. Estimates that this will improve your full clean build by up to 3 times faster, and incremental builds by up to 10 times faster!
will take 10-12 mins after that it will be good to go.
Open the cloned project in Android Studio. Project sync takes 30-40 seconds. Comment-out Firebase libraries in app/build. gradle .
You can speed up gradle a little more by using this configuration in main gradle.properties (in Windows you can find this file in C:\Users\YourUserName\.gradle\
or /Users/YourUserName/.gradle/
on Mac - or create new one If does not exist):
org.gradle.daemon=true
org.gradle.parallel=true
This is all you can do for now, Google said on IO that they will try make It faster.
There is also similiar topic: Android studio Gradle build speed up
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With