Firebas initialization unsuccessful / cordova / phonegap build

440 views
Skip to first unread message

Charles Jeremy Colnet

unread,
Apr 3, 2017, 11:20:40 PM4/3/17
to Firebase Google Group
Hello

I am trying to add firebase to my cordova / phonegap build app.
When I check the log I have this message


03-27 13:29:33.495: I/FirebaseInitProvider(21341): FirebaseApp initialization unsuccessful 

03-27 13:29:33.675: D/FirebaseAnalyticsPlugin(21341): Starting Firebase Analytics plugin 

03-27 13:29:33.685: I/FA(21341): adb shell setprop debug.firebase.analytics.app com.myapp.app 

03-27 13:29:33.695: E/FA(21341): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI


I am using cordova 6.5.0 and phonegap build / currently testing on android
I added both google-services.json and GoogleService-Info.plist to the root of www folder.

With phonegap, I only have access to the config.xml, what info do I need to add in config.xml ?



I have also added
<gap:plugin name="cordova-plugin-firebase-hooks" source="npm" />
In my config.xml ( I am using Phonegap Build )

But I still have FirebaseApp initialization unsuccessful
I think I have to edit the file res/values/strings.xml but my method doesn't seem to work : (


Here are all the possibilities that I tried in the config.xml ( config xml with widget xmlns:android="http://schemas.android.com/apk/res/android" )


 <edit-config file="res/values/strings.xml" mode="merge" target="/*">

        <string name="google_app_id">1:XXXXXXXXXX:android:XXXXXXXXXX</string>

        <string name="google_api_key">XXXXXXXXXX-XXXXXXXXXX</string>

    </edit-config>


    <gap:config-file parent="/resources" target="res/values/strings.xml">

        <string name="google_app_id">1:XXXXXXXXXX:android:XXXXXXXXXX</string>

        <string name="google_api_key">XXXXXXXXXX-XXXXXXXXXX</string>

    </gap:config-file>



    <config-file target="res/values/strings.xml" parent="/resources" mode="replace">

        <string name="google_app_id">1:XXXXXXXXXX:android:XXXXXXXXXX</string>

        <string name="google_api_key">XXXXXXXXXX-XXXXXXXXXX</string>

    </config-file>



any idea ?


thanks

Reply all
Reply to author
Forward
0 new messages