I have a simple application, and every time I click run, it takes more than 3 minutes for gradle to complete the build and load the application. And this happens both on the emulator and on my Android phone. And before you mark this message as a similar message, listen to me: I am contacting to fix the problem from the last 10 days. I survived more than 20 stack overflows of similar questions (like this one) and dozens of articles on Google, and I tried every solution he proposed, but nothing worked, Here's what I have tried so far:
- Added
org.gradle.parallel=true and org.gradle.daemon=true in gradle.properties - Added --parallel and --offline for command line options
- Enable "battery life" in the settings
- Enabled / Disabled "instant start" - does not matter.
- I allocated a lot of memory:
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF- 8 - I completely disabled Windows Defender
- I am using the latest version of gradle (2.10) and the latest version of Android Studio, which is 2.1.1. Even after you have tried all this, it takes more than 3 minutes and it is very frustrating.
When the application runs for several minutes, I noticed :app:processDebugResources in the gradle console. Perhaps this can lead to a slowdown, I do not know. In addition, I have an xml file that I am processing, and this XML file contains about 70,000 lines. Could this be causing any problems? Maybe Windows 8?
Please provide any suggestions on how to fix this. Thanks:)
android android-studio build.gradle gradle
Parth bhoiwala
source share