admob-google / admob-cordova

Google AdMob plugin for Cordova, Phonegap and Intel XDK ,support ios and android,support admob v1 and admob v2 ,Monetize your html5 app with one javascript line.api is easy to use.
65 stars 50 forks source link

Android App crash with intelXDK 2894 #17

Closed yetanotherportfolio closed 8 years ago

yetanotherportfolio commented 8 years ago

I'm using the intel XDK 2894 and when building the Android Crosswalk version, calling admob.showBanner(admob.BannerSize.BANNER,admob.Position.TOP_APP); will make the whole app crash.

admob-google commented 8 years ago

any log?

yetanotherportfolio commented 8 years ago

intel XDK is not showing any logs (even in debug mode), it just say that the app crashed. (I'm using a Nexus 5, android version 6.0.1)

arjankuijpers commented 8 years ago

which version, or commit of the plugin are you using ?.

yetanotherportfolio commented 8 years ago

I tried the current master branch and 5.0.4, they both have the same behavior.

admob-google commented 8 years ago

android system logcat log

yetanotherportfolio commented 8 years ago

got this with adb logcat:

01-31 10:40:28.522 28920 28920 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.RelativeLayout.addView(android.view.View, android.view.ViewGroup$LayoutParams)' on a null object reference
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at com.admob.cordova.plugin.AdmobAdPlugin$2.run(AdmobAdPlugin.java:228)
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:739)
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5417)
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-31 10:40:28.522 28920 28920 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
admob-google commented 8 years ago

have you call initAdmob before call showBanner?,new version submit ,try again.

admob-google commented 8 years ago

upgraded