Blank white screen on android using react-native (release only) - android

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"
}

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

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'

Related

Google Play Services Dependency

When I open my app, it is supposed to take me to the login page for Google or email. It runs me to the main screen and says update Google Play Services. I am not sure why this is happening when I am running the latest version -
compile 'com.google.android.gms:play-services-auth:11.0.0'
I switched to just the auth in order to avoid transitive dependency issues. It was not working with the regular gps dependency.
It isn't my code because I have been doing a tutorial..I've checked.
My project builds, but I would like the services to work :-)
In your project level build.gradle add
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
}

Regarding the update of gms-play-services appindexing to 10.2.0 in Android studio

I was trying to update my Google Play services app indexing to 10.2.0 and I updated the compile line in my dependencies of build.gradle as shown in the image as compile "com.google.android.gms:play-services-appindexing:10.2.0" but I am facing an error as shown in the image as "Failed to resolve: com.google.android.gms:play-services-appindexing:10.2.0".
I even tried the install repository link but it didn't work.
I had the same issue.
App indexing has moved from Play Services to Firebase.
You need to delete the line
compile 'com.google.android.gms:play-services-appindexing:10.2.0'
since this lib does not exist, you already have app indexing in your dependencies here:
compile 'com.google.firebase:firebase-appindexing:10.2.0'

Android - Warning after update google play service

After update my google play service version to last released version, when enable minify in debug or release the following warning shown and task not complete.
Warning:io.nlopez.smartlocation.activity.ActivityStore: can't find referenced method 'DetectedActivity(int,int,int)' in program class com.google.android.gms.location.DetectedActivity
Updated version : compile 'com.google.android.gms:play-services:10.2.0'
I add this line in my gradle apply plugin: 'com.google.gms.google-services'
Can anyone help me ?
I found the issue i use this Library in my project and Google play services version 10.2.0 is incompatible with this library
Try to add Google Play Service location package:
compile 'com.google.android.gms:play-services-location:10.2.0'
Also you should check SmartLocation library description, last compatible version of Google Play Services 10.0.1:
https://github.com/mrmans0n/smart-location-lib
...
Google Play Services compatible version: 10.0.1
So, I think, you should downgrade Grade Google Play service to v. 10.0.1, is you use SmartLocation library

GooglePlayServices is not working with the project

I am working on a project where I have to authenticate a user with the Google plus and I did that. Now I have shifted my project from one PC to another for some reasons. I have made changes on developers console but when I try to login with google plus after launching, it says "Google Play Services not available. This application will close."
Why this error comes when everything is fine?
gradle dependencies is as follows:
dependencies {
compile 'com.android.support:support-v4:+'
compile 'com.google.code.gson:gson:1.7'
compile 'com.google.android.gms:play-services:+'
compile('com.crashlytics.sdk.android:crashlytics:2.5.2#aar') {
transitive = true;
}
Make sure that the device (or the emulator) where you're running the app has Google Play Services installed with the latest version (currently at least 8.1.0), or set exact (earlier) version in your build.gradle.

What is the best way to add Google Play Service dependencies on Android Studio?

I have added Google Play Service dependencies to Android Studio.
I want something that works today and in the near future, something that keeps my app code up to date, without having to worry about every new Play service release, if possible.
Currently, I have this:
dependencies {
compile 'com.google.android.gms:play-services:7.5.0'
}
Is this the best way to add Google Play Service dependencies on Android?
You can use the following to always build against the latest available Google Play Services version:
compile 'com.google.android.gms:play-services:+'
However you will get a warning from Android Studio indicating that your builds are potentially non-repeatable and your code may break at any time (and you may not know why) due to changing versions behind the scenes. It's a trade-off. For a little more control you can use one of these:
compile 'com.google.android.gms:play-services:7.+'
compile 'com.google.android.gms:play-services:7.5.+'

Categories

Resources