入职新公司,接手一个老项目,构建过程中,遇到很多坑,阻塞进度3天,简单记录一下爬坑历程:

问题一:

 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 build.gradle file.

原因:

1、引入的jar包的编译Jdk和项目的编译JDK不统一,导致以上错误

2、类冲突导致

解决措施:

1、排除法找到libs文件下的异常jar包,用同一jdk版本编译的jar包替换

2、找到冲突的类,处理冲突

更多推荐