All build correctly, at launch I call sdkbox::PluginAdMob::init(); and it crashs…
What I’m missing since I follow exactly the doc and all is building without any warning.
Any help plz,
All build correctly, at launch I call sdkbox::PluginAdMob::init(); and it crashs…
What I’m missing since I follow exactly the doc and all is building without any warning.
Any help plz,
Hi,
whats the crash logcat ?
this my dependencies
<
dependencies {
implementation fileTree(include: [’*.jar’], dir: ‘libs’)
implementation project(’:libcocos2dx’)
implementation ‘com.facebook.android:facebook-android-sdk:[4,5)’
implementation files(‘libs/org.apache.http.legacy.jar’)
implementation files(‘libs/adjust-android.jar’)
implementation ‘com.google.android.gms:play-services-analytics:16.0.1’
implementation ‘com.android.installreferrer:installreferrer:1.0’
implementation files(‘libs/PluginReview.jar’)
implementation files(‘libs/PluginFirebase.jar’)
implementation files(‘libs/PluginAdMob.jar’)
}
Blockquote
Blockquote
abort 0x00000000f48b6528
art::Runtime::Abort(char const*) 0x00000000f1565cd6
android::base::LogMessage::~LogMessage() 0x00000000f16276e8
art::JavaVMExt::JniAbort(char const*, char const*) 0x00000000f1451a78
art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list) 0x00000000f1451bfa
art::ScopedCheck::AbortF(char const*, …) 0x00000000f12d7436
art::ScopedCheck::CheckThread(_JNIEnv*) 0x00000000f12d6fae
art::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::JniValueType*) 0x00000000f12d5970
art::CheckJNI::GetObjectClass(_JNIEnv*, _jobject*) 0x00000000f12c978a
sdkbox::JNIUtils::GetClassObjectFromObject(_jobject*, _JNIEnv*) 0x00000000d03b8202
sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*, _JNIEnv*) 0x00000000d03b8358
void sdkbox::JNIInvoke<void, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > >(_jobject*, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator >) 0x00000000d039cd52
sdkbox::AdMobProxy::cache(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&) 0x00000000d03a7618
CMainManager::SDKBOXAdMobLoop() CMainManager.cpp:8078
CMainManager::FixedUpdate(float) CMainManager.cpp:806
GameScene::update(float) GameScene.cpp:29
cocos2d::TimerTargetSelector::trigger(float) CCScheduler.cpp:175
cocos2d::update(float) CCScheduler.cpp:133
cocos2d::Scheduler::update(float) CCScheduler.cpp:882
cocos2d::Director::drawScene() CCDirector.cpp:266
cocos2d::Director::mainLoop() CCDirector.cpp:1475
::Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeRender(JNIEnv *) Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp:42
0x00000000e6f61640
and finally in my logcat
020-08-06 10:11:18.535 19079-19202/? D/AdMob: AdMob appid=
2020-08-06 10:11:18.535 19079-19202/? E/AdMob: WARNING: set appid with sdkbox_config.json
2020-08-06 10:11:18.536 19079-19202/? E/AdMob: AdMob: plugin admob init native fail
In android studio where do I put my app Id for adMob?
and finally… for sure I’m missing to add something correctly
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(com.sdkbox.plugin.PluginAdMob$AdInfo) (PluginAdMob.java:831)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(java.lang.String) (PluginAdMob.java:823)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at boolean com.sdkbox.plugin.PluginAdMob.isLoading(java.lang.String) (PluginAdMob.java:364)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at void com.sdkbox.plugin.PluginAdMob.cache(java.lang.String) (PluginAdMob.java:210)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at boolean com.sdkbox.plugin.PluginAdMob.nativeInit(com.sdkbox.plugin.JSON) (PluginAdMob.java:179)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(com.sdkbox.plugin.PluginAdMob$AdInfo) (PluginAdMob.java:831)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(java.lang.String) (PluginAdMob.java:823)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at boolean com.sdkbox.plugin.PluginAdMob.isLoading(java.lang.String) (PluginAdMob.java:364)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at void com.sdkbox.plugin.PluginAdMob.cache(java.lang.String) (PluginAdMob.java:210)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] at boolean com.sdkbox.plugin.PluginAdMob.nativeInit(com.sdkbox.plugin.JSON) (PluginAdMob.java:179)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] native: #12 pc 00e8a5b5 /data/app/com.gmf.www-pByUYHiLiByjqR5k8F-s3g==/lib/arm/libMyGame.so (sdkbox::AdMobProxy::cache(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&)+36)
2020-08-06 14:17:42.766 3580-3915/com.gmf.www A/zygote: java_vm_ext.cc:534] native: #13 pc 00aaaa4d /data/app/com.gmf.www-pByUYHiLiByjqR5k8F-s3g==/lib/arm/libMyGame.so (CMainManager::SDKBOXAdMobLoop()+124)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(com.sdkbox.plugin.PluginAdMob$AdInfo) (PluginAdMob.java:831)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(java.lang.String) (PluginAdMob.java:823)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at boolean com.sdkbox.plugin.PluginAdMob.isLoading(java.lang.String) (PluginAdMob.java:364)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at void com.sdkbox.plugin.PluginAdMob.cache(java.lang.String) (PluginAdMob.java:210)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at boolean com.sdkbox.plugin.PluginAdMob.nativeInit(com.sdkbox.plugin.JSON) (PluginAdMob.java:179)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(com.sdkbox.plugin.PluginAdMob$AdInfo) (PluginAdMob.java:831)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at com.google.android.gms.ads.AdView com.sdkbox.plugin.PluginAdMob.getAdView(java.lang.String) (PluginAdMob.java:823)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at boolean com.sdkbox.plugin.PluginAdMob.isLoading(java.lang.String) (PluginAdMob.java:364)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at void com.sdkbox.plugin.PluginAdMob.cache(java.lang.String) (PluginAdMob.java:210)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] at boolean com.sdkbox.plugin.PluginAdMob.nativeInit(com.sdkbox.plugin.JSON) (PluginAdMob.java:179)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] native: #12 pc 00e8a5b5 /data/app/com.gmf.www-pByUYHiLiByjqR5k8F-s3g==/lib/arm/libMyGame.so (sdkbox::AdMobProxy::cache(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&)+36)
2020-08-06 14:17:42.767 3580-3915/com.gmf.www A/zygote: runtime.cc:550] native: #13 pc 00aaaa4d /data/app/com.gmf.www-pByUYHiLiByjqR5k8F-s3g==/lib/arm/libMyGame.so (CMainManager::SDKBOXAdMobLoop()+124)
jimmy have you an idea?
Need your help, 2 days I’m on this problem
I solved my crash like this
implementation ‘com.google.android.gms:play-services-ads:16.0.0’
in place of
implementation ‘com.google.android.gms:play-services-ads:17.1.0’
but it is still not working on android
It look there is a problem with RewardedAdLoadCallback (??)
1/ 2020-08-07 17:11:54.714 2562-2827/xxxxxxxx/zygote: Rejecting re-init on previously-failed class java.lang.Class<com.sdkbox.plugin.PluginAdMob$5>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/rewarded/RewardedAdLoadCallback;
and also
2020-08-07 17:11:54.742 2562-2827/com.gmf.www E/AdMob: WARNING: set appid with sdkbox_config.json
It is a strange warning since I use the id from google for test in sdkbox_config.json
and in my manifest I set my id correctly
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxxxxxx"/> <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />
Any idea?
finally it works to solve RewardedAdLoadCallback
in build.gradle (min 3.2.0)
classpath 'com.android.tools.build:gradle:3.2.0'
in app/ build.gradle (minimim ads is 17)
implementation ‘com.google.android.gms:play-services-ads:17.2.0’
in graddle property
android.enableJetifier=true
android.useAndroidX=true
in manifest
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxxxxxx"/> <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />
SOLVED ! I hope it can helps