Gradle failed to sync with Android Studio 3.1: uninitialized object exists on reverse branch 70

After updating Android Studio from 3.0 to 3.1 Error synchronizing the gradle project with the following error.

Gradle sync failed: Uninitialized object exists on backward branch 70 Exception Details: Location: com/android/build/gradle/tasks/BuildArtifactReportTask.newArtifact(Lcom/android/build/api/artifact/BuildableArtifact;) Lcom/android/build/gradle/tasks/BuildArtifactReportTask$BuildableArtifactData; 
+5
source share
4 answers

As tech_android has already posted in this comment to solve this problem forever:

Remove dependency on an external JAVA installation using the built-in JDK. Remove dependency on an external JAVA installation using the built-in JDK.

+10
source

This is a bug in older JDK versions. Go to the project structure and change your project to the latest JDK, for example, 1.80_72 or later.

Hope this fixes your issue.

+4
source

1) Update the latest version of JDK, in my case jdk1.8.0_162

2) In Android Studio, select "File-> Project Structure → SDK Location → JDK Location, write the directory C: \ Program Files \ Java \ jdk1.8.0_162

3) Restart Android Studio

Solution

+1
source

It solved my problem when I used the built-in version of the JDK (recommended)

Do this :

Project Structure → SDK Location → Select Use Integrated JDK (Recommended)

0
source

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


All Articles