7

My app is running fine on the emulator in debug mode. When I tried to use a signed APK on a device or run it in release mode on the emulator using:

react-native run-android --variant=release

It just gives a blank white screen and does not load.

I am using React-Native-Navigation and React-Native-Firebase, which may or may not be contributing to the issue.

One error I do see is related to Firebase I think:

W/GooglePlayServicesUtil: Google Play services out of date. Requires 11717000 but found 10298470 11-20 11:24:04.624 16106-16106/? W/FA:

That failed to send app launch certainly looks ominous.

EDIT: I am not so sure the above error is actually causing the blank white screen when running release version on my device. This message shows up in the emulator, but my app works on the emulator. On my device I see that the version of Google Play Services is 11.7.46 which I believe should work fine.

Is there anything else that would cause my app to be a blank white screen on release only?

EDIT 2:

i found another error this time (and I have since downgraded to an older version of react-native-firebase 2.2)

11-25 12:11:07.278 5281-5295/com.spectrum E/FirebaseCrash: Failed to load crash reporting com.google.android.gms.internal.mn: .com.google.android.gms.dynamite.DynamiteModule$zzc: Remote load failed. No local fallback found. at com.google.android.gms.internal.ml.zzFk(Unknown Source) at com.google.firebase.crash.zzc.zzFi(Unknown Source) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: com.google.android.gms.dynamite.DynamiteModule$zzc: Remote load failed. No local fallback found. ...

EDIT 3:

here are the dependencies from app.gradle :

dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:25.0.1"
compile "com.facebook.react:react-native:+"  // From node_modules
compile project(':react-native-navigation')

// RNFirebase required dependencies
compile(project(':react-native-firebase')) {
    transitive = false
}
compile "com.google.firebase:firebase-core:11.0.4"

// RNFirebase optional dependencies
compile "com.google.firebase:firebase-crash:11.0.4"
compile "com.google.firebase:firebase-messaging:11.0.4"

// If you are receiving Google Play API availability issues, add the     following dependency
//    compile "com.google.android.gms:play-services-base:11.0.4"

}
Michael Campsall
  • 4,325
  • 11
  • 37
  • 52

2 Answers2

3

As the error says:

Google Play services out of date. Requires 11717000 but found 10298470

It means you have a different version of google play services. Im gonna assume you are using the latest firebase which is Firebase 11.6.0, but you are using Google Play Services version 10.2.9, and the version required is 11.7.1.

From the Firebase docs(in the prerequisites):

A device running Android 4.0 (Ice Cream Sandwich) or newer, and Google Play services 11.6.0 or higher

So, you either need to download the latest version of Google Play Services, or downgrade firebase in your build.gradle file

You currently have this version of firebase:

'com.google.firebase:firebase-core:11.6.0'

downgrade(maybe) to:

'com.google.firebase:firebase-core:10.2.0'

if you downgrade the firebase-core, then you have to also downgrade(in build.gradle) firebase-auth/firebase-storage/firebase-database

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134
  • I am not so sure GPS is the cause anymore (see my edits to the question) – Michael Campsall Nov 25 '17 at 18:40
  • what shows in the logcat when you debug using your device? – Peter Haddad Nov 25 '17 at 18:42
  • we need more info, we cant guess why its blank screen, but if unsigned key is working and signed key is not means there is different code in each one.. maybe try on different device android versions to check more of the issue – Peter Haddad Nov 25 '17 at 20:06
  • I added another error message, with the hopes that it has more useful info – Michael Campsall Nov 25 '17 at 20:52
  • @MichaelCampsall no I think thats because you downgraded and the firebase version you are using is not supported on that downgraded one, check this https://github.com/invertase/react-native-firebase under this title in the page`Supported versions - React Native / Firebase` – Peter Haddad Nov 25 '17 at 21:16
  • @MichaelCampsall cant you regenerate the signed apk? – Peter Haddad Nov 26 '17 at 07:07
  • from what I can see version 2.2 supports RN 0.47+ (I am on 0.49.5) and firebase for android 11.0 + (my app.gradle says I am targeting 11.0.4). I should also say that the release version does not work on the emulator, just the debug version. – Michael Campsall Nov 26 '17 at 20:07
  • @MichaelCampsall which android studio are u using? can you go to tools in the top menu then click firebase and then connect to firebase using the assistant there? Or please change the the firebase-core/messaging/crash to 11.6.0. Also do you have this in the app.gradle at the bottom `apply plugin: 'com.google.gms.google-services'`? – Peter Haddad Nov 26 '17 at 20:38
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/159863/discussion-between-michael-campsall-and-peter-haddad). – Michael Campsall Nov 27 '17 at 00:02
  • @MichaelCampsall talk in chat – Peter Haddad Nov 27 '17 at 18:01
0

As you see the log, Google Play services out of date. Requires 11717000 but found 10298470, it shows that this error comes with older play service.

The Current version is 11.6.0, so you need to update build.gradle file and sync.

'com.google.firebase:firebase-core:11.6.0'