I had an app on Google Play that went live but when the 1st customer who installed it couldn't sign into the app, I was advised by another developer to generate a signed APK (filename: app-release.apk) and then drag it onto my emulator for testing. I did this and i got an error when trying to sign in, so i unpublished the app until i fix this.
I then tried by building an APK which gave me a file: app-debug.apk. I dragged this onto my emulator and was able to sign in with no issues.
Can anyone tell me what i could be doing wrong?
When i run the app from Android Studio onto the emulator, it runs fine, and signs me into my Firebase Database authenticated accounts.
Any help would be appreciated.
CodePudding user response:
You might have enabled obfuscation (R8) for release builds and not written the required -keep
rules for it. Without a stack-trace this is quite a theoretical question, but likely it would show a ClassNotFoundException
, because the name of some class or class member had been obfuscated, which shouldn't have been obfuscated.
CodePudding user response:
Your project may be using specifying different servers for debug and release builds. This is a common practice when you don't want to corrupt the release database with debug/testing data. See this SO post for an example. I'd check your build gradle and see if I could spot something like this there.
So, the release server may be down, whereas the debug server may still be up and running.