0

This is my build.gradle(app) file..

apply plugin: 'com.android.application'

android {

compileSdkVersion 26

defaultConfig {
    applicationId "com.example.odev09.eazyvisi"
    minSdkVersion 16
    targetSdkVersion 19
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
    release {
        debuggable false
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

    debug {
        debuggable true
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

When I Generate Signed APK it will give below error

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.

Nikunj
  • 3,937
  • 19
  • 33
Jayashri
  • 21
  • 1
  • 8
  • Possible duplicate of [Error:Execution failed for task ':android:transformClassesAndResourcesWithProguardForRelease'](https://stackoverflow.com/questions/33877134/errorexecution-failed-for-task-androidtransformclassesandresourceswithprogua) – Aditya Jan 02 '18 at 13:41

2 Answers2

1

Add these lines to your proguard-rules.pro

-ignorewarnings

-keep class * {
    public private *;
}
Nikunj
  • 3,937
  • 19
  • 33
0

Just try,

Your compileSdkVersion 26 so You need to change Targetsdk version

targetSdkVersion 26
buildToolsVersion '26.0.2'

my suggestion try this, applicationId contain three parts so change this one also

(eg: com.test.android)