0
我在Cocos2d-x v3.2中使用Sdkbox Vungle v1.2.0.1。我成功整合了Vungle並在iOS上運行它。我使用方法sdkbox::PluginVungle::isCacheAvailable()
來檢查Vungle視頻是否可用。但它無法在android上運行。日誌說INF: Failed to find method id of isCacheAvailable
。我認爲這個問題的發生是因爲它無法讀取Android上的Vungle SDK庫。無法在Vungle android上找到isCacheAvailable的方法ID,因爲它無法讀取Vungle庫
我根據Vungle的集成文檔所做的一切,我的Android.mk是這樣的:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/extensions)
$(call import-add-path,$(LOCAL_PATH))
LOCAL_MODULE := cocos2dcpp_shared
LOCAL_MODULE_FILENAME := libcocos2dcpp
FILE_LIST := $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)
LOCAL_SRC_FILES := cpp/main.cpp \
cpp/ProjectUtilsAndroid.cpp
LOCAL_SRC_FILES += $(FILE_LIST:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \
$(LOCAL_PATH)/../../cocos2d/extensions \
$(LOCAL_PATH)/../../cocos2d/external/rapidjson \
$(LOCAL_PATH)/../../cocos2d/cocos/editor-support/spine \
$(LOCAL_PATH)/../../cocos2d/cocos/ui \
$(LOCAL_PATH)/../../cocos2d/cocos/network \
LOCAL_CFLAGS += -Wno-psabi -D CLASSIC
LOCAL_CPPFLAGS += -std=c++11
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static
LOCAL_WHOLE_STATIC_LIBRARIES += spine_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_ui_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static
LOCAL_STATIC_LIBRARIES += android_native_app_glue
LOCAL_LDLIBS += -landroid
LOCAL_LDLIBS += -llog
LOCAL_STATIC_LIBRARIES += PluginVungle
LOCAL_STATIC_LIBRARIES += sdkbox
include $(BUILD_SHARED_LIBRARY)
$(call import-module,cocos/ui)
$(call import-module,cocos/network)
$(call import-module,extensions)
$(call import-module,editor-support/cocosbuilder)
$(call import-module,editor-support/spine)
$(call import-module,sdkbox)
$(call import-module,pluginvungle)
$(call import-module,.)
能否請你幫我找出我錯過到底是哪一部分?
EDIT:
onVungleCacheAvailable()
被觸發,但每當我呼叫sdkbox::PluginVungle::isCacheAvailable()
時,它總是返回false。
我們的插件團隊正在研究它 - 當我聽到回聲時我會更新它! –