Cannot invoke call or register option - java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/database/DatabaseUtilsCompat;
merlinJeyakumar opened this issue · 1 comments
clicking call button or Register
getting below error
E/AndroidRuntime: FATAL EXCEPTION: main
Process: aminrahkan7.sipapp, PID: 11154
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/database/DatabaseUtilsCompat;
at org.abtollc.db.DBProvider.query(DBProvider.java:514)
at org.abtollc.api.SipProfile.getProfileFromDbId(SipProfile.java:1487)
at org.abtollc.sdk.AbtoPhoneCfg.getAccount(AbtoPhoneCfg.java:304)
at org.abtollc.sdk.AbtoPhoneCfg.getAccountExpire(AbtoPhoneCfg.java:353)
at aminrahkan7.sipapp.Activitis.CallActivity.onCreate(CallActivity.java:89)
at android.app.Activity.performCreate(Activity.java:6466)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2750)
at android.app.ActivityThread.access$1100(ActivityThread.java:186)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1606)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:238)
at android.app.ActivityThread.main(ActivityThread.java:6006)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:937)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:798)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.database.DatabaseUtilsCompat" on path: DexPathList[[zip file "/data/app/aminrahkan7.sipapp-2/base.apk"],nativeLibraryDirectories=[/data/app/aminrahkan7.sipapp-2/lib/arm, /data/app/aminrahkan7.sipapp-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at org.abtollc.db.DBProvider.query(DBProvider.java:514)
at org.abtollc.api.SipProfile.getProfileFromDbId(SipProfile.java:1487)
at org.abtollc.sdk.AbtoPhoneCfg.getAccount(AbtoPhoneCfg.java:304)
at org.abtollc.sdk.AbtoPhoneCfg.getAccountExpire(AbtoPhoneCfg.java:353)
at aminrahkan7.sipapp.Activitis.CallActivity.onCreate(CallActivity.java:89)
at android.app.Activity.performCreate(Activity.java:6466)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2750)
at android.app.ActivityThread.access$1100(ActivityThread.java:186)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1606)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:238)
at android.app.ActivityThread.main(ActivityThread.java:6006)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:937)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:798)
Suppressed: java.lang.ClassNotFoundException: android.support.v4.database.DatabaseUtilsCompat
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 18 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
I/Process: Sending signal. PID: 11154 SIG: 9
Add these two lines to your gradle.properties :
android.useAndroidX=true
android.enableJetifier=true
documentation ref : https://developer.android.com/jetpack/androidx/migrate
You may also face 'library not find error' problem after running it on your device, this is how to fix it :
Add this option to your build.gradle (app) :
defaultConfig {
...
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
Have fun ...
EDIT : don't forget to clean project / rebuild ...