Hi,
Just updated my SDK to version 20 and also updated Google Play Services to ver20.
Android.jar is set to ver 20 in Tools>Configure
Moved the latest google-play-services.jar into the Libraries folder.
Am using the latest Admob Library from here (2.00?)
MinSDK is set to 13.
Now my apps crash straight away...
Was using this code originally..
Have also tried this method (which I hadn't seen before)
Anyone any ideas?!?
Chris
Just updated my SDK to version 20 and also updated Google Play Services to ver20.
Android.jar is set to ver 20 in Tools>Configure
Moved the latest google-play-services.jar into the Libraries folder.
Am using the latest Admob Library from here (2.00?)
MinSDK is set to 13.
Now my apps crash straight away...
B4X:
Could not find class 'com.google.android.gms.ads.InterstitialAd', referenced from method mobi.mindware.admob.interstitial.AdmobInterstitialsAds.Initialize
VFY: unable to resolve new-instance 517 (Lcom/google/android/gms/ads/InterstitialAd;) in Lmobi/mindware/admob/interstitial/AdmobInterstitialsAds;
Could not find class 'com.google.android.gms.ads.AdRequest$Builder', referenced from method mobi.mindware.admob.interstitial.AdmobInterstitialsAds.LoadAd
VFY: unable to resolve new-instance 513 (Lcom/google/android/gms/ads/AdRequest$Builder;) in Lmobi/mindware/admob/interstitial/AdmobInterstitialsAds;
VFY: unable to resolve virtual method 2775: Lcom/google/android/gms/ads/InterstitialAd;.isLoaded ()Z
Unable to resolve superclass of Lmobi/mindware/admob/interstitial/AdmobInterstitialsAds$1; (512)
Link of class 'Lmobi/mindware/admob/interstitial/AdmobInterstitialsAds$1;' failed
VFY: unable to resolve static field 1598 (BANNER) in Lcom/google/android/gms/ads/AdSize;
VFY: unable to resolve static field 1598 (BANNER) in Lcom/google/android/gms/ads/AdSize;
Could not find class 'com.google.android.gms.ads.AdView', referenced from method anywheresoftware.b4a.admobwrapper.AdViewWrapper.Initialize2
VFY: unable to resolve new-instance 516 (Lcom/google/android/gms/ads/AdView;) in Lanywheresoftware/b4a/admobwrapper/AdViewWrapper;
Could not find class 'com.google.android.gms.ads.AdRequest$Builder', referenced from method anywheresoftware.b4a.admobwrapper.AdViewWrapper.LoadAd
VFY: unable to resolve new-instance 513 (Lcom/google/android/gms/ads/AdRequest$Builder;) in Lanywheresoftware/b4a/admobwrapper/AdViewWrapper;
Could not find class 'com.google.android.gms.ads.AdView', referenced from method anywheresoftware.b4a.admobwrapper.AdViewWrapper.Pause
VFY: unable to resolve check-cast 516 (Lcom/google/android/gms/ads/AdView;) in Lanywheresoftware/b4a/admobwrapper/AdViewWrapper;
Could not find class 'com.google.android.gms.ads.AdView', referenced from method anywheresoftware.b4a.admobwrapper.AdViewWrapper.Resume
VFY: unable to resolve check-cast 516 (Lcom/google/android/gms/ads/AdView;) in Lanywheresoftware/b4a/admobwrapper/AdViewWrapper;
Unable to resolve superclass of Lanywheresoftware/b4a/admobwrapper/AdViewWrapper$1; (512)
Link of class 'Lanywheresoftware/b4a/admobwrapper/AdViewWrapper$1;' failed
Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lanywheresoftware/b4a/admobwrapper/AdViewWrapper;
threadid=1: thread exiting with uncaught exception (group=0x41d09a08)
main_globals (java line: 448)
java.lang.ExceptionInInitializerError
at ******.******.main._globals(main.java:448)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at ******.******.main.initializeGlobals(main.java:264)
at ******.******.main.afterFirstLayout(main.java:95)
at ******.******.main.access$100(main.java:16)
at ******.******.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:5751)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.ads.AdSize
at anywheresoftware.b4a.admobwrapper.AdViewWrapper.<clinit>(AdViewWrapper.java:37)
... 17 more
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at ******.******.main._globals(main.java:448)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at ******.******.main.initializeGlobals(main.java:264)
at ******.******.main.afterFirstLayout(main.java:95)
at ******.******.main.access$100(main.java:16)
at ******.******.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:5751)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.ads.AdSize
at anywheresoftware.b4a.admobwrapper.AdViewWrapper.<clinit>(AdViewWrapper.java:37)
... 17 more
App crashed! Process: com.******.******
App crashed! Package: com.******.****** v42 (v3.0.2)
App crashed! Application Label: ************
Force finishing activity ******.******/.main
acquireWakeLock(427cafd0): PARTIAL_WAKE_LOCK , tag=ActivityManager-Launch, flags=0x1, pid=1311, uid=1000
getMirrorDisplayStatus:falsecurState:1
Activity pause timeout for ActivityRecord{431c0420 u0 ******.******/.main}
Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1313 com.android.internal.policy.impl.PhoneWindowManager.setNavigationBarVisibility:7382 com.android.server.wm.WindowManagerService.setNavigationBarVisibility:12459 com.android.server.am.ActivityStack.resumeTopActivityLocked:1955 com.android.server.am.ActivityStack.resumeTopActivityLocked:1682
onResume
onResume
+onResume
[updatePages] total: 1, current: 0
updateAccounts - Accounts is no change
-onResume
Start proc com.htc.idlescreen.base for content provider com.htc.idlescreen.base/.setting.SettingProvider: pid=3703 uid=10110 gids={50110, 1028}
Was using this code originally..
B4X:
AdView1.Initialize("Ad", "ca-app-pub-*")
Have also tried this method (which I hadn't seen before)
B4X:
AdView1.Initialize2("Ad", "ca-app-pub-8", AdView1.SIZE_SMART_BANNER)
Anyone any ideas?!?
Chris