调用ads_plugin.showAds(AdsType.AD_TYPE_BANNER)游戏黑屏。 有详细log 大神们能看出问题来吗。SOS

只要注释ads_plugin.showAds(AdsType.AD_TYPE_BANNER)就没有问题。 求解了。。。万分感谢。。。

D 1573 FancyDrawable doResume:
D 1573 MultipleRenderable setPause: false miui.maml.FancyDrawable@43f16868
D 1573 RendererCore self resume: miui.maml.RendererCore@44133ae8
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{42ec11e8 V.E… …ID 0,0-930,189 #7f0800b4 app:id/adaptive}child view android.widget.LinearLayout{44023c48 V.E…C. …ID 0,0-930,188 #7f0a0035 app:id/ll_frame} measured out of bounds at 188px clamped to 189px
D 7494 dalvikvm Trying to load lib /data/app-lib/com.benjoey.DizzyMath.a800002-1/libcocos2djs.so 0x42e99d30
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{42eb90b0 V.E… …ID 0,0-930,189 #7f0800b4 app:id/adaptive}child view android.widget.LinearLayout{431f3cd0 V.E… …ID 0,0-930,188 #7f0904e2 app:id/linearLayout_bg} measured out of bounds at 188px clamped to 189px
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{434a42d0 V.E… …ID 0,0-930,189 #7f0800b4 app:id/adaptive}child view android.widget.FrameLayout{43079320 V.E… …ID 0,0-930,188 #10202d6 android:id/status_bar_latest_event_content} measured out of bounds at 188px clamped to 189px
D 7494 dalvikvm Added shared lib /data/app-lib/com.benjoey.DizzyMath.a800002-1/libcocos2djs.so 0x42e99d30
D 7494 JniHelper JniHelper::setJavaVM(0x4163d288), pthread_self() = 1074037076
D 7494 main cocos_android_app_init
D 1274 PhoneStatusBar disable: 0x00000040 -> 0x00000180 (diff: 0x000001c0)
D 1274 StatusBar.NetworkController slot=-10;action=android.intent.action.CONFIGURATION_CHANGED
D 7494 Cocos2dxActivity model=MI 4W
D 7494 Cocos2dxActivity product=cancro_wc_lte
D 7494 Cocos2dxActivity isEmulator=false
D 1274 PhoneStatusBar disable: < expand icons alerts ticker system_info back home recent clock full HIDE* >
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{42ec11e8 V.E… …ID 0,0-552,189 #7f0800b4 app:id/adaptive}child view android.widget.LinearLayout{44023c48 V.E…C. …ID 0,0-552,188 #7f0a0035 app:id/ll_frame} measured out of bounds at 188px clamped to 189px
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{42eb90b0 V.E… …ID 0,0-552,189 #7f0800b4 app:id/adaptive}child view android.widget.LinearLayout{431f3cd0 V.E… …ID 0,0-552,188 #7f0904e2 app:id/linearLayout_bg} measured out of bounds at 188px clamped to 189px
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{434a42d0 V.E… …ID 0,0-552,189 #7f0800b4 app:id/adaptive}child view android.widget.FrameLayout{43079320 V.E… …ID 0,0-552,188 #10202d6 android:id/status_bar_latest_event_content} measured out of bounds at 188px clamped to 189px
D 7494 dalvikvm Trying to load lib /data/app-lib/com.benjoey.DizzyMath.a800002-1/libcocos2djs.so 0x42e99d30
D 7494 dalvikvm Shared lib ‘/data/app-lib/com.benjoey.DizzyMath.a800002-1/libcocos2djs.so’ already loaded in same CL 0x42e99d30
D 7494 main cocos_android_app_init
D 7494 Cocos2dxActivity model=MI 4W
D 7494 Cocos2dxActivity product=cancro_wc_lte
D 7494 Cocos2dxActivity isEmulator=false
D 7494 OpenGLRenderer Enabling debug mode 0
D 1274 StatusBar.NetworkController slot=-10;action=android.intent.action.CONFIGURATION_CHANGED
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{42ec11e8 V.E… …ID 0,0-1392,189 #7f0800b4 app:id/adaptive}child view android.widget.LinearLayout{44023c48 V.E…C. …ID 0,0-1392,188 #7f0a0035 app:id/ll_frame} measured out of bounds at 188px clamped to 189px
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{42eb90b0 V.E… …ID 0,0-1392,189 #7f0800b4 app:id/adaptive}child view android.widget.LinearLayout{431f3cd0 V.E… …ID 0,0-1392,188 #7f0904e2 app:id/linearLayout_bg} measured out of bounds at 188px clamped to 189px
D 1274 SizeAdaptiveLayout com.android.internal.widget.SizeAdaptiveLayout{434a42d0 V.E… …ID 0,0-1392,189 #7f0800b4 app:id/adaptive}child view android.widget.FrameLayout{43079320 V.E… …ID 0,0-1392,188 #10202d6 android:id/status_bar_latest_event_content} measured out of bounds at 188px clamped to 189px
W 1502 Binder Caught a RuntimeException from the binder stub implementation.
W 1502 Binder java.lang.NullPointerException
W 1502 Binder at android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:280)
W 1502 Binder at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129)
W 1502 Binder at android.os.Binder.execTransact(Binder.java:404)
W 1502 Binder at dalvik.system.NativeStart.run(Native Method)
W 1185 InputMethodManagerService Got RemoteException sending setActive(false) notification to pid 7170 uid 10694
D 1274 PhoneStatusBar disable: 0x00000180 -> 0x00000100 (diff: 0x00000080)
D 1274 PhoneStatusBar disable: < expand icons alerts ticker system_info back home recent clock full HIDE >
W 7494 dalvikvm dvmFindClassByName rejecting ‘org/cocos2dx/lib/Cocos2dxLocalStorage’
D 22516 wpa_supplicant RX ctrl_iface - hexdump(len=11): 53 49 47 4e 41 4c 5f 50 4f 4c 4c
D 22516 wpa_supplicant wlan0: Control interface command ‘SIGNAL_POLL’
D 22516 wpa_supplicant nl80211: survey data missing!
D 1514 cell strength ===== cell singal strength changed : 9
D 1274 StatusBar.NetworkController onSignalStrengthsChanged received on subscription :0signalStrength=SignalStrength: 9 0 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 2147483647 gsm|lte level=4
D 1573 FancyDrawable doPause:
D 1573 MultipleRenderable setPause: true miui.maml.FancyDrawable@43f16868

新版本母包也没DebugMode了,以后的新插件DebugMode也都直接AnySDK客户端上配置。
这日志也没啥问题,没看出跟你游戏黑屏有啥关系。

    ads_plugin.preloadAds(AdsType.AD_TYPE_FULLSCREEN);
    ads_plugin.showAds(AdsType.AD_TYPE_BANNER); 

我就是使用了这两句代码就黑屏了。 看起来不应该是语法的错误

我再看看js报错吧。

搞了三天了 重新做了工程 导入anysdk还是黑屏。。
日志是一样的 只要加了展示广告的代码就黑屏。。。 我是母包 这个有影响吗

    if ( ads_plugin.isAdTypeSupported(AdsType.AD_TYPE_FULLSCREEN) ) {
        ads_plugin.showAds(AdsType.AD_TYPE_FULLSCREEN)
    }

    if ( ads_plugin.isAdTypeSupported(AdsType.AD_TYPE_BANNER) ) {
        ads_plugin.showAds(AdsType.AD_TYPE_BANNER)
    }

解决了 !使用官方的demo来加载广告!!! 自己写容易出错