I'm using Cordova for a mobile app - I'm not an Android developer. However, on some older devices, namely the Samsung Galaxy S3, I get the error below. On other devices the app runs without errors. Does this have to do with an SDK conflict? Any idea on where to look?
FATAL EXCEPTION: main
java.lang.VerifyError: com/google/android/apps/mtaas/util/instrumentations/DumpPackageStats
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1130)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4622)
at android.app.ActivityThread.access$1400(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
And in my config.xml (if this even matters) I set min sdk values:
<preference name="android-minSdkVersion" value="14" />
<preference name="android-targetSdkVersion" value="19" />
I read that, "java.lang.VerifyError can be the result when you have compiled against a different library than you are using at runtime." So perhaps there is a way to check this?
After many headaches, I've found that you need to set a higher Android SDK version in your config.xml file:
<preference name="android-minSdkVersion" value="16" />
In my case, going from version 14 to version 16 did the trick.