【发布时间】:2017-01-14 08:13:24
【问题描述】:
我想在我的 android studio 项目中使用 this 库,但是当我使用 gradle 将它添加到项目中时,它显示以下错误
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.
这似乎是因为 java 1.7 的兼容性,但我不知道如何修复它。 Android Studio 建议将 targetCompatibility = '1.7' sourceCompatibility = '1.7' 添加到该子模块的 build.gradle 但如何将其添加到 gradles 依赖项部分?
【问题讨论】:
标签: java android build.gradle