com.android.builder.dexing.DexArchiveBuilderException
其他module中使用了 Java1.8,app.gradle 中也需要声明
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
Error:com.android.dx.cf.code.SimException: default or static interface method used without –min-sdk-version >= 24
在项目的gradle.properties中添加
android.enableD8=true
Error:Program type already present: org.xmlpull.v1.XmlPullParser
jar包冲突,如上述的原因中org.xmlpull.v1.XmlPullParser依赖冲突,一般是项目中导入了多个相同的jar包,此时需要找出冲突的jar包已经导入冲突jar包的依赖,然后对冲突的jar依赖排除,如排除com.thoughtworks.xstream:xstream:1.4.7中的依赖:
implementation ('com.thoughtworks.xstream:xstream:1.4.7'){
exclude group: 'xmlpull'
}