gpt4 book ai didi

android - 我在 2 天后运行我的项目,并收到一条错误消息,提示我在支持库中存在重复文件

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

以下是错误:

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

下面是我的模块级 build.gradle 文件:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.aishwarya.easyreimbursement"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "app_name", "Easy Reimbursement"
}

debug {
applicationIdSuffix ".debug"
resValue "string", "app_name", "Easy Reimbursement (debug)"
}
}
}

/* Use 23 on 32- bit OS, as 24 onwards support for 32- bit OS has been dropped */
project.ext.supportLib = "23.2.1"

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

compile "com.android.support:appcompat-v7:$supportLib"
compile "com.android.support:design:$supportLib"
compile "com.android.support:recyclerview-v7:$supportLib"
compile "com.android.support:cardview-v7:$supportLib"

compile 'com.squareup.picasso:picasso:2.5.2'

compile 'com.jakewharton:butterknife:8.5.1'
apt 'com.jakewharton:butterknife-compiler:8.5.1'

compile 'com.android.support:multidex:1.0.1'
}

经过我的研究,我了解到这是由于重复的依赖文件造成的。我可以在我的项目依赖树中检查它。我尝试从命令行执行此操作,但没有输出:
aishwaryat@Linux-1:~/EasyReimbursement$ gradlew app:dependencies
No command 'gradlew' found, did you mean:
Command 'gradle' from package 'gradle' (universe)
gradlew: command not found
aishwaryat@Linux-1:~/EasyReimbursement$ gradle app:dependencies
The program 'gradle' is currently not installed. You can install it by typing:
sudo apt-get install gradle
aishwaryat@Linux-1:~/EasyReimbursement$

我安装了 Gradle-View 插件来查看我的项目的依赖关系树。我不明白如何检测重复条目(如果有)。下面是它的屏幕截图。

Project Dependency Tree

最佳答案

尝试清理您的项目:构建 ->清理

或者

在终端中执行根项目文件夹:

./gradlew clean

关于android - 我在 2 天后运行我的项目,并收到一条错误消息,提示我在支持库中存在重复文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43448858/

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