我,我升级了一些旧架构,我正在努力构建它。编译和gradle同步是可以的,但是当我尝试运行Build and Run / assemble时,我有以下错误:
java.lang.RuntimeException:com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / v4 / view / LayoutInflaterFactory.class
我搜索了stackoverflow和google,并尝试禁用某些依赖项support-v4,但它没有帮助,我不知道如何搜索以下依赖项树来解决它。已经尝试过bonuspack,permissionDispatcher。
你有什么想法吗?
+--- com.android.support:multidex:1.0.1
+--- project :salesChart
| \--- com.android.support:appcompat-v7:22.1.1 -> 23.4.0
| +--- com.android.support:animated-vector-drawable:23.4.0
| | \--- com.android.support:support-vector-drawable:23.4.0
| | \--- com.android.support:support-v4:23.4.0
| | \--- com.android.support:support-annotations:23.4.0 -> 25.1.0
| +--- com.android.support:support-v4:23.4.0 (*)
| \--- com.android.support:support-vector-drawable:23.4.0 (*)
+--- project :domain
+--- com.android.support:design:23.4.0
| +--- com.android.support:recyclerview-v7:23.4.0
| | +--- com.android.support:support-annotations:23.4.0 -> 25.1.0
| | \--- com.android.support:support-v4:23.4.0 (*)
| +--- com.android.support:appcompat-v7:23.4.0 (*)
| \--- com.android.support:support-v4:23.4.0 (*)
+--- com.android.support:appcompat-v7:23.4.0 (*)
+--- com.android.support:cardview-v7:23.4.0
+--- com.android.support:support-vector-drawable:23.4.0 (*)
+--- com.github.PhilJay:MPAndroidChart:v2.2.5
+--- com.nineoldandroids:library:2.4.0
+--- uk.co.chrisjenx:calligraphy:2.2.0
| \--- com.android.support:appcompat-v7:23.1.1 -> 23.4.0 (*)
+--- com.daimajia.numberprogressbar:library:1.2
+--- com.github.citux:datetimepicker:0.2.0
| \--- com.android.support:support-v13:23.1.1
| \--- com.android.support:support-v4:23.1.1 -> 23.4.0 (*)
+--- com.github.clans:fab:1.6.4
+--- joda-time:joda-time:2.9.4
+--- com.github.bumptech.glide:glide:3.7.0
+--- org.greenrobot:eventbus:3.0.0
+--- com.google.guava:guava:19.0-rc2
+--- com.google.code.findbugs:jsr305:3.0.1
+--- com.path:android-priority-jobqueue:1.1.2
| \--- com.google.android:android:2.2.1
| +--- commons-logging:commons-logging:1.1.1
| +--- org.apache.httpcomponents:httpclient:4.0.1
| | +--- org.apache.httpcomponents:httpcore:4.0.1
| | +--- commons-logging:commons-logging:1.1.1
| | \--- commons-codec:commons-codec:1.3
| +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
| +--- xerces:xmlParserAPIs:2.6.2
| +--- xpp3:xpp3:1.1.4c
| \--- org.json:json:20080701
+--- io.reactivex:rxandroid:1.2.0
| \--- io.reactivex:rxjava:1.1.4
+--- com.google.code.gson:gson:2.6.2
+--- commons-io:commons-io:2.4
+--- com.jakewharton.rxbinding:rxbinding:0.4.0
| +--- io.reactivex:rxandroid:1.1.0 -> 1.2.0 (*)
| +--- io.reactivex:rxjava:1.1.0 -> 1.1.4
| \--- com.android.support:support-annotations:23.1.0 -> 25.1.0
+--- com.annimon:stream:1.0.5
+--- com.j256.ormlite:ormlite-android:4.48
| \--- com.j256.ormlite:ormlite-core:4.48
+--- com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1
+--- com.squareup.retrofit2:retrofit:2.0.2
| \--- com.squareup.okhttp3:okhttp:3.2.0 -> 3.3.1
| \--- com.squareup.okio:okio:1.8.0
+--- com.squareup.retrofit2:converter-gson:2.0.2
| +--- com.squareup.retrofit2:retrofit:2.0.2 (*)
| \--- com.google.code.gson:gson:2.6.1 -> 2.6.2
+--- com.squareup.retrofit2:adapter-rxjava:2.0.2
| +--- com.squareup.retrofit2:retrofit:2.0.2 (*)
| \--- io.reactivex:rxjava:1.1.1 -> 1.1.4
+--- com.squareup.okhttp3:logging-interceptor:3.3.1
| \--- com.squareup.okhttp3:okhttp:3.3.1 (*)
+--- com.squareup.okhttp3:okhttp:3.3.1 (*)
+--- org.osmdroid:osmdroid-android:5.2
+--- com.github.MKergall:osmbonuspack:v5.8.1
| +--- org.apache.commons:commons-lang3:3.3.2
| +--- com.google.code.gson:gson:2.4 -> 2.6.2
| +--- com.squareup.okhttp:okhttp:2.6.0
| | \--- com.squareup.okio:okio:1.6.0 -> 1.8.0
| +--- org.osmdroid:osmdroid-android:5.2
| \--- com.android.support:support-v4:23.1.1 -> 23.4.0 (*)
+--- com.google.dagger:dagger:2.7
| \--- javax.inject:javax.inject:1
+--- com.github.hotchemi:permissionsdispatcher:2.2.0
| \--- com.android.support:support-v4:23.1.1 -> 23.4.0 (*)
+--- com.jakewharton:butterknife:8.5.1
| +--- com.jakewharton:butterknife-annotations:8.5.1
| | \--- com.android.support:support-annotations:25.1.0
| +--- com.android.support:support-annotations:25.1.0
| \--- com.android.support:support-compat:25.1.0
| \--- com.android.support:support-annotations:25.1.0
+--- com.crashlytics.sdk.android:answers:1.3.6
| \--- io.fabric.sdk.android:fabric:1.3.10
\--- com.crashlytics.sdk.android:crashlytics:2.5.5
+--- com.crashlytics.sdk.android:answers:1.3.6 (*)
+--- com.crashlytics.sdk.android:crashlytics-core:2.3.8
| +--- com.crashlytics.sdk.android:answers:1.3.6 (*)
| \--- io.fabric.sdk.android:fabric:1.3.10
+--- io.fabric.sdk.android:fabric:1.3.10
\--- com.crashlytics.sdk.android:beta:1.1.4
_PC1LSMReleaseCompile - ## Internal use, do not manually configure ##
+--- com.android.support:multidex:1.0.1
+--- project :salesChart
| \--- com.android.support:appcompat-v7:22.1.1 -> 23.4.0
| +--- com.android.support:animated-vector-drawable:23.4.0
| | \--- com.android.support:support-vector-drawable:23.4.0
| | \--- com.android.support:support-v4:23.4.0
| | \--- com.android.support:support-annotations:23.4.0 -> 25.1.0
| +--- com.android.support:support-v4:23.4.0 (*)
| \--- com.android.support:support-vector-drawable:23.4.0 (*)
+--- project :domain
+--- com.android.support:design:23.4.0
| +--- com.android.support:recyclerview-v7:23.4.0
| | +--- com.android.support:support-annotations:23.4.0 -> 25.1.0
| | \--- com.android.support:support-v4:23.4.0 (*)
| +--- com.android.support:appcompat-v7:23.4.0 (*)
| \--- com.android.support:support-v4:23.4.0 (*)
+--- com.android.support:appcompat-v7:23.4.0 (*)
+--- com.android.support:cardview-v7:23.4.0
+--- com.android.support:support-vector-drawable:23.4.0 (*)
+--- com.github.PhilJay:MPAndroidChart:v2.2.5
+--- com.nineoldandroids:library:2.4.0
+--- uk.co.chrisjenx:calligraphy:2.2.0
| \--- com.android.support:appcompat-v7:23.1.1 -> 23.4.0 (*)
+--- com.daimajia.numberprogressbar:library:1.2
+--- com.github.citux:datetimepicker:0.2.0
| \--- com.android.support:support-v13:23.1.1
| \--- com.android.support:support-v4:23.1.1 -> 23.4.0 (*)
+--- com.github.clans:fab:1.6.4
+--- joda-time:joda-time:2.9.4
+--- com.github.bumptech.glide:glide:3.7.0
+--- org.greenrobot:eventbus:3.0.0
+--- com.google.guava:guava:19.0-rc2
+--- com.google.code.findbugs:jsr305:3.0.1
+--- com.path:android-priority-jobqueue:1.1.2
| \--- com.google.android:android:2.2.1
| +--- commons-logging:commons-logging:1.1.1
| +--- org.apache.httpcomponents:httpclient:4.0.1
| | +--- org.apache.httpcomponents:httpcore:4.0.1
| | +--- commons-logging:commons-logging:1.1.1
| | \--- commons-codec:commons-codec:1.3
| +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
| +--- xerces:xmlParserAPIs:2.6.2
| +--- xpp3:xpp3:1.1.4c
| \--- org.json:json:20080701
+--- io.reactivex:rxandroid:1.2.0
| \--- io.reactivex:rxjava:1.1.4
+--- com.google.code.gson:gson:2.6.2
+--- commons-io:commons-io:2.4
+--- com.jakewharton.rxbinding:rxbinding:0.4.0
| +--- io.reactivex:rxandroid:1.1.0 -> 1.2.0 (*)
| +--- io.reactivex:rxjava:1.1.0 -> 1.1.4
| \--- com.android.support:support-annotations:23.1.0 -> 25.1.0
+--- com.annimon:stream:1.0.5
+--- com.j256.ormlite:ormlite-android:4.48
| \--- com.j256.ormlite:ormlite-core:4.48
+--- com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1
+--- com.squareup.retrofit2:retrofit:2.0.2
| \--- com.squareup.okhttp3:okhttp:3.2.0 -> 3.3.1
| \--- com.squareup.okio:okio:1.8.0
+--- com.squareup.retrofit2:converter-gson:2.0.2
| +--- com.squareup.retrofit2:retrofit:2.0.2 (*)
| \--- com.google.code.gson:gson:2.6.1 -> 2.6.2
+--- com.squareup.retrofit2:adapter-rxjava:2.0.2
| +--- com.squareup.retrofit2:retrofit:2.0.2 (*)
| \--- io.reactivex:rxjava:1.1.1 -> 1.1.4
+--- com.squareup.okhttp3:logging-interceptor:3.3.1
| \--- com.squareup.okhttp3:okhttp:3.3.1 (*)
+--- com.squareup.okhttp3:okhttp:3.3.1 (*)
+--- org.osmdroid:osmdroid-android:5.2
+--- com.github.MKergall:osmbonuspack:v5.8.1
| +--- org.apache.commons:commons-lang3:3.3.2
| +--- com.google.code.gson:gson:2.4 -> 2.6.2
| +--- com.squareup.okhttp:okhttp:2.6.0
| | \--- com.squareup.okio:okio:1.6.0 -> 1.8.0
| +--- org.osmdroid:osmdroid-android:5.2
| \--- com.android.support:support-v4:23.1.1 -> 23.4.0 (*)
+--- com.google.dagger:dagger:2.7
| \--- javax.inject:javax.inject:1
+--- com.github.hotchemi:permissionsdispatcher:2.2.0
| \--- com.android.support:support-v4:23.1.1 -> 23.4.0 (*)
+--- com.jakewharton:butterknife:8.5.1
| +--- com.jakewharton:butterknife-annotations:8.5.1
| | \--- com.android.support:support-annotations:25.1.0
| +--- com.android.support:support-annotations:25.1.0
| \--- com.android.support:support-compat:25.1.0
| \--- com.android.support:support-annotations:25.1.0
+--- com.crashlytics.sdk.android:answers:1.3.6
| \--- io.fabric.sdk.android:fabric:1.3.10
\--- com.crashlytics.sdk.android:crashlytics:2.5.5
+--- com.crashlytics.sdk.android:answers:1.3.6 (*)
+--- com.crashlytics.sdk.android:crashlytics-core:2.3.8
| +--- com.crashlytics.sdk.android:answers:1.3.6 (*)
| \--- io.fabric.sdk.android:fabric:1.3.10
+--- io.fabric.sdk.android:fabric:1.3.10
\--- com.crashlytics.sdk.android:beta:1.1.4
答案 0 :(得分:-1)
您可以针对此问题尝试两种选择。
1)尝试在构建配置下清理整个项目。
2)转到目录下的源文件夹并删除build文件夹。因为它总是在运行配置时生成并尝试运行程序。
答案 1 :(得分:-1)
查看你的v4库,你已经导入了两次和不同的版本,因此它在构建中创建了一个混乱,因为你在该库中有1个资源,2个条目(来自同一个库的2个不同版本) 。
在您的gradle中搜索所有支持库,某些项目正在导入:com.android.support:support-v4:23.4.0
,其余项目正在使用com.android.support:support-v4:23.1.1
。
您需要将所有gradle依赖项设置为相同的版本 - 23.4.0或23.1.1