I was trying to use your code sample to get working Firebase, but seems something getting wrong as app is crashing when running.
I created repository inside github to have a try:
So what I'm done for Android part:
1) Placed in cocos2d/external Firebase SDK "firebase_cpp_sdk"
Added there Android.mk with Firebase core and Analytics
2) Modified in project /app folder Android.mk -> included Firebase SDK
3) Modified project Gradle to add native Firebase SDK
4) Modified AppActivity added sActivity variable which hold Activity.
5) Added to JNIHelper function GetActivity to get Activity.
6) Added Firebase initialization code to AppDelegate.cpp
//LogMessage("Initialize the Analytics library");
app = ::firebase::App::Create(::firebase::AppOptions(), cocos2d::JniHelper::getEnv(),
app = ::firebase::App::Create(::firebase::AppOptions());
#endif // defined(__ANDROID__)
Pretty sure something doing wrong or need additional initializations on Android side.
Can you please have a look on this?:)