Android Studio - Gradle sync error

I have a sync error in Android Studio. I Usage: version 1.0.2 from the channel channel. Gradle I tried with version 2.2.1 (downloaded from https://www.gradle.org/downloads ) and downloaded the version myself. JDK : jdk1.8.0_05

I created a new project, and the error is always the same: enter image description here

Error: Cannot find method 'Org.objectweb.asm.ClassReader.getMaxStringLength () I'. Possible reasons for this unexpected error:

The gradle dependency cache may be corrupted (this sometimes happens after connecting to the network timeout.)

I tried to solve the problem with the invalidation of the caching method and stop Gradle daemon , but nothing ..

+16
java android android-gradle build.gradle gradle
Jan 04 '15 at 22:09
source share
3 answers

Delete .gradle directories .gradle both your home directory and at the top level of your project. Gradle cache directives are independent of the Clear Caches and Reboot option.

+24
Jan 05 '15 at 17:00
source share

After upgrading to Android Studio 2.3, I received this error and the top answer did not work. Following the answers here , I finally got better.

Switch to

gradle -> wrapper -> gradle.wrapper.properties

And switch to distributionUrl to the following:

 distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip 
+1
Mar 25 '17 at 5:41
source share

Sorry for the late reply, but I hope it will still be helpful. I ran into the same problem and deleting the .gradle directories did not help.

Try reinstalling the JDK. In my case, I deleted my JDK 1.7.0_60 (x64) and JDK 1.8.0_5 (x86). Then I installed JDK 1.8.0_45 (x64) and the problem disappeared. NTN.

0
May 10 '15 at 16:09
source share



All Articles