Android execution failed for task application: proguardRelease

I can’t generate a signed APK for my application, I am stuck with the java.io.IOException error. The execution failed for the task: "app: proguardRelease" I have what I consider to be the main gradle file, see below

apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.1" defaultConfig { applicationId "com.okason.clients" minSdkVersion 16 targetSdkVersion 21 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.google.api-client:google-api-client:1.19.0' compile 'com.google.android.gms:play-services:6.1.71' compile 'com.android.support:support-v4:21.0.0' compile 'com.android.support:appcompat-v7:21.0.0' } 

The generated Proguard-rules.pro file is empty and I did not touch the proguard-android.txt file in the SDK. I even tried to copy this file to the root of the application so that it was the same location as the app.gradle file, without success.

I tried to run this gradlew.bat command with success. Please someone can take a look and tell me what I'm doing wrong. I am updating the SDK and Android Studio to the latest versions.

+7
android android-gradle proguard
source share
2 answers

Solved the problem by setting minifyEnabled true to minifyEnabled false in the app.gradle file

+8
source share

I think, sir, you can avoid the mistake of not turning off Proguard. Mark this answer with Sir Eric Schlenz regarding this issue. To just get to the point where the build will go through proguard, you need to add the -dontwarn entries for the packages he complained about to your proguard-project.txt file.

+2
source share

All Articles