我在我的项目中使用了一些库/模块。
在其中两个库中,有一个"nineoldandroids“与"-compile 'com.nineoldandroids:library:2.4.0'”in每个库/模块“一起使用!
如果我想在Android中用"Build - Generate Signed APK“来缓存APK,我总是会得到"ProGuard”错误,其中包含以下错误:
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]))如何解决这个错误?
SwipeListView
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'}
MainProject
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')}
发布于 2015-03-26 12:11:42
谢谢大家的回答。
问题是某些.jar文件保存在"build“文件夹中。
这是因为我已经用从Eclipse迁移了.jars,然后删除了它,并将编译添加到gradle中。但我还没有看到,在“构建”文件夹中,它们也被保存。
发布于 2015-03-24 13:26:09
您可以从您的主要项目中排除一个九雄机器人传递依赖项:
dependencies {
compile project(':library_NumberPickerCompat')
compile(project(':library_SwipeListView')) {
// Already present in NumberPickerCompat
exclude group: 'com.nineoldandroids'
}
...
}请注意第二个compile依赖项上的额外括号
发布于 2015-03-24 12:55:19
试试这个:
SwipeListView:
dependencies {
compile 'com.android.support:support-v4:20.0.0'
}NumberPickerCompat:
dependencies {
}MainProject:
dependencies {
//put nineoldandroids in main project
compile 'com.nineoldandroids:library:2.4.0'
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')
}https://stackoverflow.com/questions/29233035
复制相似问题