Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.2 sync failed after update

I updated from Android Studio 3.1.4 to 3.2. Now sync fails with the error message

Sync finish event has not been received

How can this be fixed? Invalidate Caches/Restart did not help.

The ida log shows the following warning:

java.lang.NoClassDefFoundError: org/gradle/wrapper/WrapperConfiguration
    at org.jetbrains.plugins.gradle.util.GradleUtil.getWrapperConfiguration(GradleUtil.java:92)
    at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:208)
    at org.jetbrains.plugins.gradle.service.GradleInstallationManager.doGetGradleHome(GradleInstallationManager.java:194)
    at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:129)
    at org.jetbrains.plugins.gradle.GradleManager.lambda$getExecutionSettingsProvider$2(GradleManager.java:150)
    at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:732)
    at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doCreateFacade(ExternalSystemFacadeManager.java:201)
    at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:177)
    at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:132)
    at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:269)
    at com.sun.proxy.$Proxy148.getResolver(Unknown Source)
    at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:84)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:163)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:149)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:550)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$5.run(ExternalSystemUtil.java:647)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.WrapperConfiguration PluginClassLoader[org.jetbrains.plugins.gradle, 181.5540.7.32.5014246] com.intellij.ide.plugins.cl.PluginClassLoader@5f6fe2bb
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
like image 747
barq Avatar asked Sep 25 '18 07:09

barq


People also ask

What is Gradle Android?

Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.

What is project in Gradle?

A project is essentially a collection of Task objects. Each task performs some basic piece of work, such as compiling classes, or running unit tests, or zipping up a WAR file. You add tasks to a project using one of the create() methods on TaskContainer , such as TaskContainer. create(String) .


2 Answers

The only solution I found was to remove Android Studio and reinstall Android Studio 3.2 from scratch.

like image 133
barq Avatar answered Nov 14 '22 23:11

barq


EDIT

The problem might be different from OP but this is also a new issue in AS 3.2 which gives you Gradle sync error

I had Gradle sync error for the last couple of days after I updated to AS 3.2 and in my case, the problem was one of my library modules contain the following in Manifest.xml

 <uses-sdk
            android:minSdkVersion="15"
            android:targetSdkVersion="27" />

and the solution was to remove 'uses-sdk' (in AndroidManifest.xml file) in ALL the modules in your project.

like image 41
Yohannes Ejigu Ademe Avatar answered Nov 15 '22 00:11

Yohannes Ejigu Ademe