Reputation: 3147
I have been successfully generating signed apk for my application and distributing it locally within my team. But suddenly two days before I couldnt generate signed apk. When I change the build variable to "release" the gradle invocation finished without any error or warning. But when creating signed apk I get the following error:
Information:Compilation completed with 1 error and 0 warnings in 11 sec
Information:1 error
Information:0 warnings
Error:Gradle: Execution failed for task ':module_name:proguardRelease'.
> java.io.IOException: Please correct the above warnings first.
build.gradle:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
minSdkVersion 17
targetSdkVersion 19
versionCode 1
versionName '1.0'
}
signingConfigs {
release {
storeFile file('release.keystore')
storePassword '*************'
keyAlias '*********'
keyPassword '**************'
}
}
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/volley.jar')
compile files('libs/StarIOPort3.1.jar')
compile files('libs/logentries-android-2.1.2.jar')
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.android.support:support-v4:19.1.0'
compile 'com.google.android.gms:play-services:+'
compile 'com.wrapp.floatlabelededittext:library:0.0.3'
}
Where can I see the warnings? There are no warnings in the "Messages". Also in the gradle console.
What is causing this? How can I fix this?
Upvotes: 1
Views: 6272
Reputation: 6461
If you use windows, open a cmd prompt, and cd
to the root of your project. There should be gradlew.bat
in it (automatically created by Android Studio). Try and run gradlew.bat clean assembleRelease -d
to see the proguard warnings.
You will need to fix these proguard warnings before it lets you do a successful build. You can fix them by adding -dontwarn org.apache.*
(or similar related to your warnings) to your project proguard file release
section.
Upvotes: 1