amitshekhariitbhu / Android-Debug-Database

A library for debugging android databases and shared preferences - Make Debugging Great Again
https://outcomeschool.com
Apache License 2.0
8.41k stars 870 forks source link

NoClassDefFoundError: Failed resolution of: Lcom/amitshekhar/R$string #141

Open fly7632785 opened 5 years ago

fly7632785 commented 5 years ago
  java.lang.NoClassDefFoundError: Failed resolution of: Lcom/amitshekhar/R$string;
        at com.amitshekhar.DebugDB.initialize(DebugDB.java:52)
        at com.amitshekhar.DebugDBInitProvider.onCreate(DebugDBInitProvider.java:41)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1696)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1671)
        at com.amitshekhar.DebugDBInitProvider.attachInfo(DebugDBInitProvider.java:80)
        at android.app.ActivityThread.installProvider(ActivityThread.java:5012)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4607)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4547)
        at android.app.ActivityThread.access$1500(ActivityThread.java:151)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5267)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:957)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:752)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.amitshekhar.R$string" on path: DexPathList[[zip file "/data/app/hdpfans.com-1/base.apk"],nativeLibraryDirectories=[/data/app/hdpfans.com-1/lib/arm, /cust/lib, /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 com.amitshekhar.DebugDB.initialize(DebugDB.java:52) 
        at com.amitshekhar.DebugDBInitProvider.onCreate(DebugDBInitProvider.java:41) 
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1696) 
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1671) 
        at com.amitshekhar.DebugDBInitProvider.attachInfo(DebugDBInitProvider.java:80) 
        at android.app.ActivityThread.installProvider(ActivityThread.java:5012) 
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4607) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4547) 
        at android.app.ActivityThread.access$1500(ActivityThread.java:151) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:135) 
        at android.app.ActivityThread.main(ActivityThread.java:5267) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:957) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:752) 
        Suppressed: java.lang.ClassNotFoundException: com.amitshekhar.R$string
        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 available
debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'

Hello, I got this problem, can you give me some help? Thank you.

shanuka commented 5 years ago

i have same problem

amitshekhariitbhu commented 5 years ago

@fly7632785 @shanuka Please provide more details. Library version and build tool version?

shanuka commented 5 years ago

android studio 3.3 library version 1.0.4