【发布时间】:2019-03-25 12:38:41
【问题描述】:
我发现使用 ionic 3 时出现问题,我尝试运行“ionic cordova run android”但出现错误,这是我得到的错误:
Dex: 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.
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
Error: cmd: Command failed with exit code 1 Error output:(Main.java:775)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Dex: 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.
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
这是我的离子信息: geMpF.png
谁能帮我解决这个问题。
谢谢。
【问题讨论】:
-
能否将
java --version和gradle --version的结果相加 -
@christoandrew 我的 JDK 版本是 1.8.0_73,我的 gradle 版本是 2.2.0