0

我正在使用带有 Cocos2d-x v3.2 的 Sdkbox Vungle v1.2.0.1。我成功集成了 Vungle 并在 iOS 上运行它。我使用方法sdkbox::PluginVungle::isCacheAvailable()来检查 Vungle 视频是否可用。但它不能在安卓上运行。日志说INF: Failed to find method id of isCacheAvailable。我认为这个问题的发生是因为它无法读取 Android 上的 Vungle SDK 库。

我根据 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。

4

1 回答 1

0

这是 sdkbox 中的一个 bug,在 1.2.5 版本中已修复。您可以在此处下载 1.2.5 版本

于 2015-09-18T04:50:27.813 回答