gpt4 book ai didi

android - Android:任务 ':app:transformClassesWithJarMergingForDebug'的执行失败

转载 作者:行者123 更新时间:2023-12-03 05:14:36 24 4
gpt4 key购买 nike

有谁知道如何解决这个问题?我使用Android Studio 1.5.1,并且在尝试运行应用程序时弹出以下错误。

以下是我的Messages Gradle Build中显示的错误:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/CallSuper.class

对于此错误,我尝试在线搜索几种解决方案,例如:
-从Android菜单清洁项目(“构建”>“清洁”)
-从cmd清除gradle(project_source / gradlew clean)
-重新启动Android Studio
-检查“build.gradle”中依赖项是否重复

但是,以上都不适合我。

以下是我的build.gradle文件:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}

apply plugin: 'com.android.application'

repositories {
maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'io.fabric'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.example.l33902.contactmanagment1512"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"

multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

useLibrary 'org.apache.http.legacy'

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.prolificinteractive:material-calendarview:0.7.0'

compile files('libs/json_simple-1.1.jar')
compile files('libs/jtar-1.1.jar')
compile files('libs/microsoft-translator-java-api-0.6-mod.jar')
compile project(':libraries:tess-two')

compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.2@aar') {
transitive = true;
}
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}

}

crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}

最佳答案

compile 'com.android.support:support-v4:23.1.1'  

排除此依赖性,然后尝试。我认为它显示错误,因为您同时使用v4和v7依赖性。您可以使用v7或v4依赖项。

关于android - Android:任务 ':app:transformClassesWithJarMergingForDebug'的执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34735535/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com