Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Gradle issue after updating to version 0.6.0

Since I updated Android Studio to version 0.6.0 I'm facing following issue with Gradle Sync:

enter image description here

There's a discussion on Google+ and Google adt-dev group which suggests that the auto enabling of new Manifest Merger causing the issue. The discussion and solution is so unclear on both platforms, although I did try to add android { useOldManifestMerger true; } as suggested in build.gradle but I'm still getting this error.

P.S: We're using RoboGuice and suspecting that it could be compatibility issue.

Here's the log:

2014-06-09 11:07:35,927 [ 171888]   WARN - nal.AbstractExternalSystemTask - Cause: com.android.builder.BuilderConstants 
com.intellij.openapi.externalSystem.model.ExternalSystemException: Cause: com.android.builder.BuilderConstants
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectImportErrorHandler.createUserFriendlyError(AbstractProjectImportErrorHandler.java:106)
    at org.jetbrains.plugins.gradle.service.project.BaseProjectImportErrorHandler.getUserFriendlyError(BaseProjectImportErrorHandler.java:153)
    at org.jetbrains.plugins.gradle.service.project.BaseGradleProjectResolverExtension.getUserFriendlyError(BaseGradleProjectResolverExtension.java:352)
    at com.android.tools.idea.gradle.project.AndroidGradleProjectResolver.getUserFriendlyError(AndroidGradleProjectResolver.java:334)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:364)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:330)
    at org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:203)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:116)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:64)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37)
    at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
    at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)
    at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:406)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3$2.run(ExternalSystemUtil.java:483)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

2014-06-09 11:07:35,927 [ 171888]   WARN - .project.GradleProjectImporter -  
2014-06-09 11:07:35,927 [ 171888]   INFO - .project.GradleProjectImporter - Cause: com.android.builder.BuilderConstants
like image 564
adnanyousafch Avatar asked Jun 09 '14 10:06

adnanyousafch


People also ask

What is latest Android Gradle version?

Download the latest Gradle distribution The current Gradle release is version 7.5.1, released on 05 Aug 2022. The distribution zip file comes in two flavors: Binary-only.

Why does Gradle Sync Fail?

In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.

How do I update Android Studio to latest version?

Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences). In the left panel, click Appearance & Behavior > System Settings > Updates. Be sure that Automatically check for updates is checked, then select a channel from the drop-down list (see figure 1). Click Apply or OK.


1 Answers

I had the same problem, I had to comment:

apply plugin: 'android-test'

and

testCompile 'junit: junit: 4.10'
testCompile 'org.robolectric: robolectric: 2.3'
testCompile 'com.squareup: fest-android: 1.0 +.'

instrumentTestCompile 'junit: junit: 4.10'
instrumentTestCompile 'org.robolectric: robolectric: 2.3'
instrumentTestCompile 'com.squareup: fest-android: 1.0 +.'

My problem was the plugin support for test: https://github.com/robolectric/deckard-gradle/issues/11

I recommend you follow this post: https://plus.google.com/+AndroidDevelopers/posts/Tzof6zatrJW

And this: https://github.com/robolectric/gradle-android-test-plugin/pull/33

like image 58
jackgris Avatar answered Sep 25 '22 01:09

jackgris