java-Android Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code.

来源:互联网 发布:ubuntu 删除文件 编辑:程序博客网 时间:2024/06/05 10:55

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.

(通常将maven项目移植到android studio中的时候,会出现此错误)

android {    compileSdkVersion 25    buildToolsVersion "25.0.3"    defaultConfig {        ...        ...        ...        jackOptions {            enabled true        }    }    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }}
阅读全文
0 0
原创粉丝点击