Skip to content
TommyLemon edited this page Apr 10, 2017 · 5 revisions

常用问题及解决方法:

1.编译或运行时报错:重复引用v4包 Multi dex files define Landroid/support/v4...

方法1: 解决app内依赖v7导致包重复引用:

1)删除ZBLibrary依赖的 android-support-v4.jar

2)ZBLibrary的build.gradle文件内 compile files('libs/android-support-v4.jar') 改为 compile 'com.android.support:support-v4:23.1.0'

3)如果有依赖v7包,把v7包版本改为23.1.0 compile 'com.android.support:appcompat-v7:23.1.0'

注意v4,v7,compileSdkVersion的版本必须保持一致,我这里都是23

方法2:(尝试过几次,第一次可行,后来就不行了) 把app和ZBbLibrary的gradle里的 compile fileTree(dir: 'libs', include: ['.jar']) 改成 provided fileTree(include: ['.jar'], dir: 'libs')

https://github.com/TommyLemon/Android-ZBLibrary/issues/8

其它办法: https://my.oschina.net/tommylemon/blog/665242

2.其它 https://my.oschina.net/tommylemon/blog/665242

Clone this wiki locally