50 EUR giveaway for Firebase SDK integration

50 EUR giveaway for Firebase SDK integration
0.0 0


Thanks, will try to test it.


How about eclipse ?


It should be same:) just attach JAR files from SDK’s



  1. pack firebase into one jar file, proj.android/libs/google-firebase.jar
  2. set app_id & api_key with c++ code,
#if defined(__ANDROID__)
    ::firebase::AppOptions options;
    app = ::firebase::App::Create(options, JniHelper::getEnv(), JniHelper::GetActivity());
    app = ::firebase::App::Create(::firebase::AppOptions());
#endif  // defined(__ANDROID__)

because I don’t know the correct folder path for google-services.json with eclipse:

 E/firebase(28055): Failed to read Firebase options from the app's resources.  You'll need to either at least set AppOptions::app_id and AppOption::api_key or include google-services.json your app's resources.

repo https://github.com/yinjimmy/firebase

UPDATE: only got first_open and session_start events on android platform, something wrong.


Hi, someone managed to run Firebase C++ sdk on Android?


Hi, yes this one was finished - just check my previously posted git repository.


Hi, thanks, I downloaded your repository and run with “cocos run -p android --android-studio” It deploys but crashes while running. I replaced com.estoty.firebase and google-services.json to my settings and it crashes anyway : ( logcat does not give any crashlog. In my other own test project I statically linked the sdk like you did and also statically linked google play services c++ sdk. I used cocos function JniHelper::getActivity(). It keeps crashing with
pid: 31921, tid: 31981, name: GLThread 11544 >>> com.Lukusoft.FirebaseTest <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame I/DEBUG ( 193): #00 pc 0003be24 /system/lib/libc.so (tgkill+12)
Stack frame I/DEBUG ( 193): #01 pc 00016985 /system/lib/libc.so (pthread_kill+52)
Stack frame I/DEBUG ( 193): #02 pc 00017597 /system/lib/libc.so (raise+10)
Stack frame I/DEBUG ( 193): #03 pc 00013d3d /system/lib/libc.so (__libc_android_abort+36)
Stack frame I/DEBUG ( 193): #04 pc 000124ec /system/lib/libc.so (abort+4)
Stack frame I/DEBUG ( 193): #05 pc 0040ea59 /data/app/com.Lukusoft.FirebaseTest-1/lib/arm/libMyGame.so
Stack frame I/DEBUG ( 193): #06 pc 0040f013 /data/app/com.Lukusoft.FirebaseTest-1/lib/arm/libMyGame.so (firebase::App::Create(firebase::AppOptions const&, char const*, _JNIEnv*, _jobject*)+258)
I am getting crazy


That strange, maybe latest changes not public, can you check if you see latest commit with changes to few files, it was merged by other user



Hi Guys,

I’ve a similar problem when integrating Firebase on a c++ project, same native crash reported by pebulusek, have you been able to fix it?
I’m going crazy too!

Thank you.


Hi, there is now much easier implementation in SDKBOX also google published they official example for cocos2d-x. Have a look on this examples;)


SDKBox supports firebase analytics now. easy way:

install sdkbox cli

python -c "import urllib; s = urllib.urlopen('https://raw.githubusercontent.com/sdkbox-doc/en/master/install/install.py').read(); exec s"

install plugin

sdkbox import firebase

firebase-sample , firebase-doc


My problem was not about cocos2d but with a c++ project using Firebase directly.
Finally today I’ve solved the problem, I was linking the wrong libraries (probably a little different architecture) from the Firebase SDK.
Thanks anyway for the help.


I’m not sure if this has been talked about here … but the Firebase people have a page on how to integrate Firebase/AdMob with Cocos2d-x:


It isn’t as well documented as I would like but I got AdMob working in my app.