1.TransformException: java.util.zip.ZipException: duplicate entry: android/support/design/widget/CoordinatorLayout$1.class
解决办法:
your one of dependency has different version of android support library.force the version in build.gradle root with
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.0.1'
force 'com.android.support:design:27.0.1'
force 'com.android.support:appcompat-v7:27.0.1'
}
}
2.引用第三方出现v4包冲突
compile('com.airbnb.android:lottie:2.5.4') { exclude group: 'com.android.support.v4' }
3.compileSdkVersion与buildToolsVersion引起的问题
No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Message{kind=ERROR, text=No resource found that matches the given name: attr 'android:keyboardNavigationCluster'., sources=[/Users/chenxiangyu/Frame/syswin1/fuzhoutoon-android/Toon/build/intermediates/data-binding-layout-out/toon/debug/values-v26/values-v26.xml:15:21-54], original message=, tool name=Optional.of(AAPT)}
原先
compileSdkVersion 25
buildToolsVersion "25.0.2"
升级后无误:
compileSdkVersion 27
buildToolsVersion '27.0.3'