4

In my debug android app I made a sign in into firebase with google and facebook and it worked well, but after generating signed APK it's not working, I updated SHA1 in firebase project with release SHA and updated key hash in facebook for developers also but it still not working what can I do.

vikas kumar
  • 10,447
  • 2
  • 46
  • 52

3 Answers3

2

Most of the times things like this happens because of proguard, it removes some of the files when building apk. Check if it works when proguard is disabled. if it works then try to configure proguard to keep all required files.

To disable proguard set minifyEnabled false in build.gradle after changing it will look somewhat like

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

}

To further configure proguard you can easily find tutorial on google. Some helpful links:-

https://stackoverflow.com/a/26274623/5176343

https://stackoverflow.com/a/15761408/5176343

Henu
  • 1,622
  • 2
  • 22
  • 27
0

It's tough to say without seeing the code, but one thing that has worked for me in the past was turning off proguard and/or minify in build.gradle. Those things were changing property names in the release apk for me which then caused de-serialization to fail for me because the names didn't match what was in the json.

Daniel
  • 56
  • 3
0

Have you selected a build version to release and than generate singed apk i hope this will work for you.