I've tried adding an AdView as the Android docs describe. It compiles, but at runtime it crashes.
As soon as the .apk contains "layout.addView(adView);", it will crash with this logcat:
02-10 12:27:37.817: D/dalvikvm(13002): Added shared lib /data/app-lib/com.somevendor.someapp-1/libjson.so 0x41400710
02-10 12:27:37.817: D/dalvikvm(13002): Trying to load lib /data/app-lib/com.somevendor.someapp-1/libbitop.so 0x41400710
02-10 12:27:37.817: D/dalvikvm(13002): Added shared lib /data/app-lib/com.somevendor.someapp-1/libbitop.so 0x41400710
02-10 12:27:37.856: E/AndroidRuntime(13002): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.somevendor.someapp/com.giderosmobile.android.someappActivity}: java.lang.NullPointerException
02-10 12:27:37.856: E/AndroidRuntime(13002): at com.giderosmobile.android.someappActivity.onCreate(someappActivity.java:70)
02-10 12:27:37.859: W/ActivityManager(439): Force finishing activity com.somevendor.someapp/com.giderosmobile.android.someappActivity
02-10 12:27:37.905: D/AES(439): process : com.somevendor.someapp
02-10 12:27:37.905: D/AES(439): module : com.somevendor.someapp v15 (1.0)
02-10 12:27:37.905: D/AEE/LIBAEE(439): shell: raise_exp(2, 13002, -1361051648, com.somevendor.someapp, 0x0x5be4e938, 0x0x0)
02-10 12:27:38.178: V/WindowManager(439): Changing focus from null to Window{413f1e68 u0 Application Error: com.somevendor.someapp}
02-10 12:27:38.179: I/WindowManager(439): Gaining focus: Window{413f1e68 u0 Application Error: com.somevendor.someapp}
02-10 12:27:38.397: W/ActivityManager(439): Activity pause timeout for ActivityRecord{41691ee8 u0 com.somevendor.someapp/com.giderosmobile.android.someappActivity}
The content of my "res/layout/main.xml" (I tried naming it activity_main.xml too) is:
<?xml version="1.0" encoding="utf-8"?>
Comments