AdMob JNI Errors - ART runtime issues

EDIT: The issues are ART related. Dalvik works fine.

I’m working on adding AdMob ads to a simple test android project.
I’ve followed all the steps explained in this tutorial and also this youtube tutorial but I’m always getting the same error messages in LogCat and afterwards my game crashes.

The full log file can be read here.
This is an excerpt of the JNI Error messages:

07-20 17:38:46.782: A/art(13575): art/runtime/check_jni.cc:64] JNI DETECTED ERROR IN APPLICATION: java_array == null
07-20 17:38:46.782: A/art(13575): art/runtime/check_jni.cc:64]     in call to GetArrayLength
07-20 17:38:46.782: A/art(13575): art/runtime/check_jni.cc:64]     from java.lang.Object 

In the same LogCat I can however see that the ads are correctly downloaded from the google ad servers.

It’s frustrating since it looks like I’m the only one with this problem after a lot of Google searches…

Android: 4.4.2 KitKat and 4.4.4 KitKat

Device: Google/LG Nexus 5

AdMob Version: 2.1

Thanks in advance for any help!

~monserboy

I had a similar problem. I was running the android runtime (ART) on my phone instead of the more common Dalvik. Turned out that ART was not supported by the AdMob plugin I used.

It might be a different problem for you but you can try to change your runtime to Dalvik.

ART is the new and future runtime for Android (as far as i understood), so getting it running for ART is pretty important. If you don’t care about iOS and you only want to show a banner this might be a good option for you.