Ich ersetzen java 8 mit java 7 android studio Fehler?
warum ich ersetzen JAVA 8 mit JAVA 7,Android studio Fehler?
> Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
Error:...while parsing android/support/v7/recyclerview/R$attr.class
Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
Error:...while parsing android/support/v7/recyclerview/R$dimen.class
Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
Error:...while parsing android/support/v7/recyclerview/R$id.class
Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
Error:...while parsing android/support/v7/recyclerview/R$styleable.class
Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
Error:...while parsing android/support/v7/recyclerview/R.class
Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
Error:...while parsing com/example/administrator/comjarlib/R$anim.class
Error:Error converting bytecode to dex:
............
Ich denke, zu verwenden retroLambda in Android Studio.
Jemand mit ähnlichen Problem /aufgelöst werden kann, geben einige Zeiger, um es zu lösen.
Bin ich mit Android Studio 2.1 Vorschau 3 mit der Note 2.10
Tat Sie versuchen, das hinzufügen dieser beiden Zeilen zu dem build.gradle-Datei?
die zwei Linien?
Hast du gelesen das error-log?
die zwei Linien?
Hast du gelesen das error-log?
If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file.
InformationsquelleAutor allen218 | 2016-03-24
Du musst angemeldet sein, um einen Kommentar abzugeben.
Diese eine hat mir geholfen. In Ihrem Projekt die wichtigsten
build.gradle
- Datei fügen Sie diese Zeilen von code inallprojects
Abschnitt (oder ergänzen Sie diesen Abschnitt, wenn er nicht da ist).Dies funktionierte tatsächlich.
Hatte dieses problem Upgrade von Studio 2.1 zu 2.2 mit nicht-android-Gläser, das war die Antwort.
Dies ist, wie mein build.gradle Aussehen, aber es funktioniert nicht allprojects { repositories { jcenter() } Aufgaben.withType(JavaCompile) { sourceCompatibility = 1.7 targetCompatibility = 1.7 } }
Für mich endete dies funktioniert. Es scheint die beste Lösung, wenn Sie noch andere Abhängigkeiten, die auch diesen Fehler auslösen sowie.
InformationsquelleAutor Victor Nidens
Wenn ich das jetzt nicht falsch gradle android-plugin extends 'java' - plugin, so können Sie einfach fügen Sie diese beiden Zeilen in deinem "android" - block in deinem build.gradle :
Funktionierte gut für mich.
InformationsquelleAutor Nicolas Bossard