【发布时间】:2014-12-17 11:10:27
【问题描述】:
build.gradle 文件
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'abc'
keyPassword 'feet'
storeFile file('C:/Users/Nabasree/Desktop/mylocation')
storePassword 'feet'
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
compileSdkVersion 19
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "in.myapp"
minSdkVersion 14
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
debug {
debuggable true
signingConfig signingConfigs.config
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
}
}
dependencies {
compile project(':facebookSDK')
compile project(':glowPadView')
compile project(':pullToRefreshListView')
compile project(':librari')
// compile ('com.github.flavienlaurent.datetimepicker:library:VERSION');
compile project(':viewPagerIndicatorLib')
compile files('libs/android-saripaar-1.0.2.jar')
compile files('libs/android-support-v13.jar')
compile files('libs/com.haarman.listviewanimations-2.6.0.jar')
compile files('libs/crashlytics.jar')
compile files('libs/eventbus-2.2.1.jar')
compile files('libs/image-chooser-library-1.3.0.jar')
compile files('libs/Parse-1.7.1.jar')
compile files('libs/picasso-2.3.2.jar')
compile files('libs/sugar-1.2.jar')
}
我很少有图书馆项目,例如 facebook。我的项目和库都使用相同版本的支持库 v13。
生成签名的 apk 时出现这些错误
任务“:myapp:proguardRelease”执行失败。
java.io.IOException: Can't write [..\build\intermediates\classes-proguard\release\classes.jar] (Can't read [..\build\intermediates\exploded-aar\F-Up\facebookSDK\unspecified\libs\android-support-v13.jar(;;;;;;!META-INF/MANIFEST.MF)] (Duplicate zip entry [android/support/v4/c/b.class == android-support-v13.jar:android/support/v4/util/ArrayMap$1.class]))
我不知道如何解决这个问题并生成一个签名的 apk
还浏览了库项目的 libs 文件夹,但没有找到 android-support-v4.jar。我只有android-support-v13.jar
【问题讨论】:
-
嗨 Nabasree,您找到解决问题的方法了吗?我现在看到完全相同的错误,我相信我像你一样拉扯我的头发:[
标签: android android-studio android-gradle-plugin build.gradle