Android Studio 2.X | Android Studio 3.X |
A引用B,B引用C,A不引用C | implementation |
compile | api |
provided | compileOnly |
apk | runtimeOnly |
debugCompile | debugImplementation |
releaseCompile | releaseImplementation |
1.*Manifest merger failed with multiple errors, see logs
AS的Gradle插件默认会启用Manifest Merger Tool,若Library项目中也定义了与主项目相同的属性(例如默认生成的Android:icon和android:theme),则此时会合并失败,并报上面的错误。两种解决方法:
1在AndroidManifest.xml的<manifest根标签上加入xmlns:tools="http://schemas.android.com/tools"否则会找不到namespace
并将<application标签下添加tools:replace="android:icon, android:theme"(多个属性用,隔开)
2打开资源文件AndroidManifest.xml->点击下面的Merged Manifest->找出具体报错信息链接修改即可
*DexArchiveMergerException: Unable to merge dex 有两个相同的库文件需要删掉一个
2.Process unexpectedly exit. org.gradle.internal.UncheckedException: java.