AssembleDebug not working with Gradle2.4 in Android Studio

I recently updated the gradle-wrapper.properties file to use gradle -2.4.
Here is my new updated gradle-wrapper.properties file:

 #Sun Dec 21 21:28:27 GMT+05:30 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 

After this update, I ran a clean command to use versions 2.4 and 2.2.1 (an older version).

Now, if I use the ./gradlew assembleDebug command in Android studio, it throws the following error:

 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':ActiveAndroid:compileDebugTestAidl'. > Executor Singleton not started * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

But if I run the same command on the command line, it works.
Any idea what could be wrong?

+6
source share
3 answers

I ran into this problem. What have I done to solve it

  • kill the entire Android studio through the task manager (closing all instances should be enough)
  • Manually deleted
  • .gradle, .idea, build, YOUR_PROJECT_NAME.iml of ROOT DIR
  • app.iml, build removed in the application folder
  • Reimport my project and gradle rebuild it and download the new version of gradle

I am pretty sure that some of the above steps are not needed, but I made them just for good measure.

Also I do not see any benefit when using 2.4. They promised to build 20-40% faster ... in your dreams, it hasn’t changed anything for me: /

+1
source

I noticed that this happened when I started using the Gradle daemon. If I removed the -daemon option (or disabled it in the IDEA / Studio Gradle settings), the problem disappeared.

Do not learn what actually causes this, or how to use the daemon and not run it.

0
source

I had the same problem every time I opened or created a new project. I looked through a lot of posts, and the only thing that has worked so far is to run the following command line inside the project folder:

gradlew -d assembleDebug

The downside is increasing the size of the project folder to 10 MB, but it works.

0
source

Source: https://habr.com/ru/post/987084/


All Articles