0

I have changed the minifyEnabled to true in build.gradle file. Then i got the issue

 Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
    :app:transformClassesAndResourcesWithProguardForRelease FAILED
    Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
    > java.io.IOException: Please correct the above warnings first.

dependencies

compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/YouTubeAndroidPlayerApi.jar')
debugCompile project(path: ':djlibrary')
releaseCompile project(path: ':djlibrary')
compile 'com.android.support:cardview-v7:24.1.1'
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:design:24.1.1'
compile 'com.google.firebase:firebase-database:9.2.1'
compile 'com.google.firebase:firebase-messaging:9.2.1'
compile 'com.google.firebase:firebase-auth:9.2.1'
compile 'com.google.android.gms:play-services-gcm:9.2.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:support-v4:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.1'

There is some issue with proguard. Kindly help me with this to get it done

Sangram Haladkar
  • 707
  • 9
  • 22
Jay Vignesh
  • 374
  • 3
  • 11

1 Answers1

0

When using Firebase Authentication with compile 'com.google.firebase:firebase-auth:9.2.1' try adding the following flags to your proguard-rules.pro:

-keepattributes Signature
-keepattributes *Annotation*

Read more at Set up Firebase Authentication for Android.

For Firebase Realtime Database with compile 'com.google.firebase:firebase-database:9.2.1' you need to consider how your model objects will be serialized and deserialized after obfuscation. For details, read more at Set up Firebase Realtime Database for Android.

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96