美文网首页
cocos2d-x 3.16 android studio go

cocos2d-x 3.16 android studio go

作者: 人气小哥 | 来源:发表于2018-11-19 16:56 被阅读0次

    将 Firebase 添加到您的 C++ 项目(仅供参考)
    https://firebase.google.com/docs/cpp/setup

    Firebase后台
    https://console.firebase.google.com/

    Firebase集成cocos2dx(主要参考)
    https://firebase.google.com/docs/admob/cpp/quick-start?hl=zh-cn
    相关git
    https://github.com/firebase/quickstart-cpp/tree/master/admob/testapp

    根据官方教程添加库时 出现问题
    Error while executing process XXX/ndk-build.cmd with arguments

    需要把教程的libapp.a改为libfirebase_app.a
    需要把教程的libadmob.a改为libfirebase_admob.a

    Android.mk
    # The path to the Firebase C++ SDK, in the project's root directory.
    FIREBASE_CPP_SDK_DIR := ../../../firebase_cpp_sdk
    
    APP_ABI := armeabi-v7a x86
    STL := $(firstword $(subst _, ,$(APP_STL)))
    FIREBASE_LIBRARY_PATH := $(FIREBASE_CPP_SDK_DIR)/libs/android/$(TARGET_ARCH_ABI)/$(STL)
    
    include $(CLEAR_VARS)
    LOCAL_MODULE := firebase_app
    LOCAL_SRC_FILES := $(FIREBASE_LIBRARY_PATH)/libfirebase_app.a
    LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/$(FIREBASE_CPP_SDK_DIR)/include
    include $(PREBUILT_STATIC_LIBRARY)
    
    include $(CLEAR_VARS)
    LOCAL_MODULE := firebase_feature
    LOCAL_SRC_FILES := $(FIREBASE_LIBRARY_PATH)/libfirebase_admob.a
    LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/$(FIREBASE_CPP_SDK_DIR)/include
    include $(PREBUILT_STATIC_LIBRARY)
    

    一个国人的参考文章:
    https://github.com/yinjimmy/firebase/tree/firebase_1_2_1
    https://www.jianshu.com/p/be16b6602ac5

    相关文章

      网友评论

          本文标题:cocos2d-x 3.16 android studio go

          本文链接:https://www.haomeiwen.com/subject/beeafqtx.html