Prannoy Mittal February 2016

Android Studo Gradle Sync Falied

I am new to Android Development. Facing issue with gradle. Tried multiple solutions on net but didnt work out changing heap size and all.

Seeing following logs:

2016-02-09 00:50:01,621 [  14176]   INFO - .project.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: [-Pandroid.injected.build.model.only=true, -Pandroid.injected.build.model.only.advanced=true, -Pandroid.injected.invoked.from.ide=true, --init-script, /tmp/asLocalRepo0.gradle, --init-script, /tmp/ijinit0.gradle] 
2016-02-09 00:50:06,475 [  19030]   INFO - .project.GradleProjectResolver - Gradle project resolve error 
org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle installation '/opt/android-studio/gradle/gradle-2.8'.
    at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:59)
    at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

Answers


Extranion February 2016

As answered by Griffin at http://stackoverflow.com/a/29144520/476796

Try this:

1) File -> Invalidate caches / Restart

2) Shutdown Android Studio

3) Remove .gradle folder in the user home directory

4) Restart Android Studio let it download all the Gradle stuff it needs

5) Gradle build success !

6) Rebuild project.... success !

If that doesn't work you can also try to check if you are using the correct gradle. You can check this in gradle/wrapper/gradle-wrapper.properties


Prannoy Mittal February 2016

Finally trying out of multiple things. Commenting following lines in the project resolved it.

org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize\=512

Can anyone explain how did it help ?

Post Status

Asked in February 2016
Viewed 3,719 times
Voted 9
Answered 2 times

Search




Leave an answer