1

This is the structure of my project

enter image description here

I use Firebase Realtime Database and Firebase Phone Auth. The app works fine but when i set

minifyEnabled true

Firebase not send to me the SMS code for the auth. I used this proguard-rules

-keepattributes Signature
-keepattributes *Annotation*

-keep class persistence.** {
  *;
}

-keep class com.firebase.** { *; }
-keep class org.apache.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }
-dontwarn org.apache.**
-dontwarn org.w3c.dom.**

-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
-dontwarn com.squareup.okhttp.** 
-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry

what did I do wrong?

This is my gradle

  buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
                'proguard-rules.pro'
    }
}
a.sarto
  • 73
  • 4
  • 12
  • This proguard file looks correct to me for firebase excludes - but are you sure it is being read? Do you see that it is skipping these files in your build output? Can you include relevant lines from your build gradle file? – Billy Lazzaro May 11 '18 at 15:39
  • "Do you see that it is skipping these files in your build output?" How can i check this? I added the buildTypes of gradle – a.sarto May 11 '18 at 15:55
  • 3
    this might not a proguard problem, did you check this -> https://stackoverflow.com/questions/46772115/firebase-phone-authentication-not-working-after-apk-released-in-play-store-even – Levi Moreira May 11 '18 at 15:56
  • 1
    Thank you so much! You saved me!!! – a.sarto May 11 '18 at 16:15

0 Answers0