我有一个 MobileFirst Cordova 项目的问题,当我使用 android studio 构建它时,它可以在 android 版本高于 5.0 的终端上运行,但对于 android 版本 < 5.0 我有这个问题:
03-16 10:49:29.591 18948-18948/com.ibm.scana E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ibm.scana, PID: 18948
java.lang.NoClassDefFoundError: org.apache.cordova.Whitelist$URLPattern
at org.apache.cordova.Whitelist.addWhiteListEntry(Whitelist.java:137)
at org.apache.cordova.ConfigXmlParser.parse(ConfigXmlParser.java:86)
at org.apache.cordova.ConfigXmlParser.parse(ConfigXmlParser.java:75)
at org.apache.cordova.CordovaActivity.loadConfig(CordovaActivity.java:236)
at org.apache.cordova.CordovaActivity.onCreate(CordovaActivity.java:206)
at com.ibm.scana.CordovaApp.onCreate(CordovaApp.java:18)
at android.app.Activity.performCreate(Activity.java:5541)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
我试图更改 compileSdkVersion 和 buildToolsVersion 但它仍然不起作用。