FirebaseInitProvider: FirebaseApp initialization unsuccessful
FirebaseInitProvider: FirebaseApp initialization unsuccessful
We have followed the Add Firebase to your Android Project but we can't see the app receiving data in the Firebase Console.
And when we launch the app, the log says:
FirebaseInitProvider: FirebaseApp initialization unsuccessful
What does this mean? What are we doing wrong?
I can't find this error in the docs, nor here in StackOverflow.
Answer by Sayyam for FirebaseInitProvider: FirebaseApp initialization unsuccessful
It happens when you dont have apply plugin: 'com.google.gms.google-services'
in your app/build.gradle
. Try adding it.
Also make sure you have Google Play services SDK installed in Android SDK Manager.
Answer by RichardG for FirebaseInitProvider: FirebaseApp initialization unsuccessful
I got the same logcat output.
Fixed it by updating my Google Play Services dependency to 9.0.0 in my app/build.gradle
and updating
buildScript { //... dependencies { //... classpath 'com.google.gms:google-services:3.0.0' } }
in my project build.gradle to 3.0.0
Answer by syslogic for FirebaseInitProvider: FirebaseApp initialization unsuccessful
What does this mean? What are we doing wrong?
Would assume, that the authentication did not succeed.
a) the buildscript
repositories
and dependencies
for the Project level build.gradle
:
buildscript { repositories { jcenter() } dependencies { // Gradle Plugin classpath "com.android.tools.build:gradle:2.3.0" // Google Services Plugin classpath "com.google.gms:google-services:3.0.0" } }
b) the dependencies
for the Module level app/build.gradle
(the Android Intel x86 images may still have the previous version of the Google Play Services installed, eg. currently 9.8.0
runs on the x86
emulator, while 10.2.0
runs on my physical ARM
device). referencing play-services
and firebase-core
will compile all their dependencies, unless excluding some them.
android { .... } dependencies { ... // Google Play Services Library (in particular "play-services-auth") compile "com.google.android.gms:play-services:10.2.0" // Google Firebase Library compile "com.google.firebase:firebase-core:10.2.0" }
c) the bottom line of app/build.gradle
should be:
// apply the Google Services Plugin apply plugin: 'com.google.gms.google-services'
d) make sure to have the (downloaded) credentials available at app/google-services.json
; on the Firebase Console, one has to add both SHA1 (or SHA256) hashes, of the debug and the release key-store, in order to have both builds authenticating properly; once all matches, it should report:
I/FirebaseInitProvider: FirebaseApp initialization successful
@see Setup Google Play Services or Firebase Quickstart.
Answer by Victor Mwenda for FirebaseInitProvider: FirebaseApp initialization unsuccessful
The first thing I would advice you to check on is:
1) Have you included the uses-permission INTERNET in your Manifest ?
Answer by Juan Pablo for FirebaseInitProvider: FirebaseApp initialization unsuccessful
In my case I was trying to Selectively compile Google play Services. Instead of using
compile 'com.google.android.gms:play-services:9.4.0'
as described at: https://developers.google.com/android/guides/setup#ensure_devices_have_the_google_play_services_apk
I manually added maps and some other dependencies module from Google Play Services as
compile 'com.google.android.gms:play-services-maps:9.4.0' compile 'com.google.android.gms:play-services-places:9.4.0'
Unfourtunately Firebase stoped working after this.
As a result I had to rollback and return to use
compile 'com.google.android.gms:play-services:9.4.0'
instead of selectively.
Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72
0 comments:
Post a Comment