gpt4 book ai didi

android - Gradle - ProGuard - DuplicateClasses - NineOldAndroids

转载 作者:太空狗 更新时间:2023-10-29 16:35:47 27 4
gpt4 key购买 nike

我在我的项目中使用了一些库/模块。
在其中两个库中,gradle 中使用了“nineoldandroids”,每个库中都有“-compile 'com.nineoldandroids:library:2.4.0'”库/模块!

如果我想在 Android Studio 中使用“Build - Generate Signed APK”创建 APK,我总是会收到“ProGuard”错误“duplicateclasses”出现以下错误:

Error:Execution failed for task ':xxxxx:proguardRelease'.
> java.io.IOException: Can't write
[F:\Projekte\Android_Studio\xxxx\build\intermediates\classes-proguard\
release\classes.jar] (Can't read
[F:\Projekte\Android_Studio\xxxx\build\intermediates\exploded-aar\
Android_Studio\library_SwipeListView\unspecified\libs\
nineoldandroids-2.4.0.jar(;;;;;;!META-INF/MANIFEST.MF)]
(Duplicate zip entry [com/b/a/b.class == nineoldandroids-2.4.0.jar:com
/nineoldandroids/animation/Animator$AnimatorListener.class]))

我该如何解决这个错误?

滑动 ListView :

dependencies {
compile 'com.android.support:support-v4:20.0.0'
compile 'com.nineoldandroids:library:2.4.0'

NumberPickerCompat:

dependencies {
compile 'com.nineoldandroids:library:2.4.0'

主项目:

dependencies {
compile project(':library_CalendarViewCompbat')
compile project(':library_FAB_Menu')
compile project(':library_NumberPickerCompat')
compile project(':library_ReminderDatePicker')
compile project(':library_StickyListHeaders')
compile project(':library_SwipeListView')
compile project(':library_SunDate_Picker')
compile 'com.google.android.gms:play-services:6.1.+'
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.android.support:support-v4:20.0.0'
compile files('libs/crashlytics.jar')
compile files('libs/dashclock-api-r1.1.jar')
compile files('libs/dropbox-android-sdk-1.5.3.jar')
compile files('libs/httpmime-4.0.3.jar')
compile files('libs/json_simple-1.1.jar')

最佳答案

您可以从主项目中排除 nineoldandroids 传递依赖项之一:

dependencies {
compile project(':library_NumberPickerCompat')
compile(project(':library_SwipeListView')) {
// Already present in NumberPickerCompat
exclude group: 'com.nineoldandroids'
}

...
}

请注意第二个 compile 依赖项上的额外括号

关于android - Gradle - ProGuard - DuplicateClasses - NineOldAndroids,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29233035/

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