quickstart-android icon indicating copy to clipboard operation
quickstart-android copied to clipboard

The app works fine on the emulator, but not on my phone

Open daviddominguezh opened this issue 9 years ago • 7 comments

When I execute the "database" sample on Android Studio's emulator (Nexus 4, android 6.0), it works fine, but when I try to execute the apk of the same project on my phone(Moto G2, android 6.0), the app never passes the "login" section, it just stays "loading...", it doesn't write nor read any date on the database. I'm new with firebase, so I don't have any idea of what is wrong, or what I'm missing. I need help. What I want is to be able to try out the app on a phone. Thank you.

daviddominguezh avatar Jan 02 '17 01:01 daviddominguezh

@DaveDDH here are a few things to check:

  • Does your phone have a good internet connection?
  • What is the version of Google Play services installed on your phone (Settings > Apps > Google Play services)?
  • Are there any messages showing up in the logcat output?

samtstern avatar Jan 03 '17 16:01 samtstern

@DaveDDH closing this issue since it's been a while since the last update.

samtstern avatar Jan 31 '17 01:01 samtstern

@samtstern Its not working in my case too. Recently bought a MacBook Air and installed every software needed for developing apps in AndroidStudio. Luckily, apps are easily deploying and working fine on Emulator but when I transfer the app to device [I'm uploading app to Drive and download in mobile device to install it]. It keeps showing "App Not Installed". Don't know where I'm going wrong. Uploading a screenshot for reference.

Screenshot_20200319_165630_com google android packageinstaller

TheCodingArcher avatar Mar 19 '20 11:03 TheCodingArcher

I have faced the similar issue what helped me is.

You have to provide release Sha1 certificate in firebase, during development you might have provided debug SHA1 but in production and release mode you have to provide release SHA1 in firebase page else your app will load but never signs in.

To get release certificate project>>android>>app>> click build.gradle>>on top right side click "open for editing in Android studio" >> a new window opens >> right side click Gradle tab>> a pane opens >> Click top left icon ( Execute gradle task) >> in the popup type " sigininReport " and in the terminal you can find the SHA 1 , SHA256 and MD5 certificates for different mode. Copy the the release certificate and paste it on firebase.

Now your signin works

findnizam avatar Oct 18 '20 18:10 findnizam

@DaveDDH here are a few things to check:

  • Does your phone have a good internet connection?
  • What is the version of Google Play services installed on your phone (Settings > Apps > Google Play services)?
  • Are there any messages showing up in the logcat output?

ghost avatar May 23 '22 17:05 ghost

Screenshot (56) can you find the error?? what should I do now??

ghost avatar May 23 '22 17:05 ghost

Try adding android:usesCleartextTraffic="true" in AndroidManifest.xml Inside of application tag

IzenDev avatar Aug 10 '22 21:08 IzenDev