![](/img/trans.png)
[英]Execution failed for task ':app:transformClassesWithJarMergingForDebug
[英]Execution failed for task ':app:transformClassesWithJarMergingForDebug' with Wheel Picker
這是我在stackoverflow上的第一篇文章,不幸的是,這是一個有關bug的問題:'(.。在Github上將項目添加到Android Studio后,它可以正常運行,但是當我構建可在手機上運行的APK時,它給了我錯誤:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/aigestudio/wheelpicker/BuildConfig.class
我在網上搜索了解決方案,但他們說的是關於重復班級的事情,並重建了項目,但是所有這些對我都不起作用。 這是我的gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.tiena.amsconnection"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':WheelPicker')
compile project(path: ':expanding-view')
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.1'
}
}
}
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:support-vector-drawable:26.0.1'
compile 'com.google.firebase:firebase-core:11.2.0'
compile 'com.google.firebase:firebase-messaging:11.2.0'
compile 'com.google.firebase:firebase-database:11.2.0'
compile 'com.google.android.gms:play-services:11.2.0'
compile 'com.firebaseui:firebase-ui:2.3.0'
compile 'com.facebook.android:facebook-android-sdk:4.22.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.techery:properratingbar:0.0.5'
compile 'com.ramotion.foldingcell:folding-cell:1.2.1'
compile 'com.github.clans:fab:1.6.4'
compile 'com.google.firebase:firebase-storage:11.2.0'
compile 'com.android.support:support-v4:26.+'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
請幫助我:'(這是我的第一個大項目。謝謝
從依賴項中刪除以下行:
compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.