Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle sync failed with Android Studio 3.1: Uninitialized object exists on backward branch 70

After Updating Android Studio from 3.0 to 3.1 My project gradle syncing failed 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;
like image 541
tech_android Avatar asked Mar 27 '18 14:03

tech_android


3 Answers

As @tech_android already posted in this comment, to solve that problem permanently, go to Module Settings > SDK Location > Use embedded JDK.

This will remove dependency on the external Java installation by using the embedded JDK.

Remove dependency on the external JAVA installation by using the embedded JDK.

like image 168
OneWorld Avatar answered Nov 14 '22 05:11

OneWorld


This is a bug of JDK old versions i guess. Go to the project structure and change your project to latest JDK like 1.80_72 or later versions.

Hopefully it will fix your problem.

like image 10
0xAliHn Avatar answered Nov 14 '22 06:11

0xAliHn


It's resolved my issue when I used embedded JDK(recommended) option

Do this:

Project Structure -> SDK Location -> Select "Use embedded JDK(recommended)"

like image 6
immodi Avatar answered Nov 14 '22 05:11

immodi