I am getting exception NoClassDefFoundError
whenever I try to run the app on Android API Level below 21.
07-23 03:52:53.410 11681-11681/com.xyz.abc E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.xyz.abc, PID: 11681
java.lang.NoClassDefFoundError: com.xyz.abc.database.DB$DBHelper
at com.xyz.abc.database.DB.<init>(DB.java:27)
at com.xyz.abc.abcApp.onCreate(abcApp.java:39)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
This is my gradle script
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.xyz.abc"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
multiDexEnabled true
}
This is my first Android App, I think I've made some silly mistake somewhere. Please help me out
Aucun commentaire:
Enregistrer un commentaire