Я просто включил proguard в моем проекте. После этого я успешно запускаю apk, используя debug apk.Android: не удалось создать подписанный APK после включения Proguard
При попытке создании подписал APK я получаю сообщение об ошибке
Error:Execution failed for task ':app:proguardRelease'.
> java.io.IOException: Please correct the above warnings first.
Мой Gradle файл, как этот
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.android4dev.navigationview"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:recyclerview-v7:22.1.1'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.google.android.gms:play-services:8.1.0'
}
Предупреждение
Warning:com.google.android.gms.internal.zzhu: can't find referenced class android.security.NetworkSecurityPolicy
Warning:there were 3 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
:app:proguardRelease FAILED
Error:Execution failed for task ':app:proguardRelease'.
> java.io.IOException: Please correct the above warnings first.
Я попробовал -dontwarn org.apache.lang.**
, но все равно получаю тот же вопрос
Может ли кто-нибудь помочь мне решить эту проблему.
использовать 'minifyEnabled false' –
@Binil S может у вас ваши предупреждения? –
@IntelliJAmiya Я думаю, что он хочет включить proguard, поэтому 'minifyEnabled' должен быть' true' – hehe