java.lang.RuntimeException:无法实例化接收器java.lang.ClassNotFoundException:未在路径上找到类:DexPathList

时间:2015-09-18 00:59:29

标签: android broadcast runtimeexception

我遇到一个简单项目的问题,一个发送消息的广播,接收者有一个祝酒词。它有效,但是当我添加一个Xposed类时,会给我以下错误。



popover.setContent(newText);
popover.reconfigure();






Process: com.nul00.de.ro.android.xposed.temar, PID: 5120
    java.lang.RuntimeException: Unable to instantiate receiver com.nul00.de.ro.android.xposed.temar.Temar: java.lang.ClassNotFoundException: Didn't find class "com.nul00.de.ro.android.xposed.temar.Temar" on path: DexPathList[[zip file "/data/app/com.nul00.de.ro.android.xposed.temar-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
            at android.app.ActivityThread.handleReceiver(ActivityThread.java:2590)
            at android.app.ActivityThread.access$1700(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
            at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:117)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.nul00.de.ro.android.xposed.temar.Temar" on path: DexPathList[[zip file "/data/app/com.nul00.de.ro.android.xposed.temar-2/base.apk"],nativeLibraryDirectories=[/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 android.app.ActivityThread.handleReceiver(ActivityThread.java:2585)
            at android.app.ActivityThread.access$1700(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
            at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:117)
    Suppressed: java.lang.NoClassDefFoundError: com.nul00.de.ro.android.xposed.temar.Temar
            at dalvik.system.DexFile.defineClassNative(Native Method)
            at dalvik.system.DexFile.defineClass(DexFile.java:226)
            at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
            at dalvik.system.DexPathList.findClass(DexPathList.java:321)
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
            ... 13 more
    Suppressed: java.lang.ClassNotFoundException: com.nul00.de.ro.android.xposed.temar.Temar
            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)
            ... 12 more
     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available




广播有效。但就在实施时,"实现了IXposedHookInitPackageResources"该计划做FC。 模块的构造很好,因为我已经验证了。

我看到你可以解决在eclipse中输入项目属性的问题,但是当我开发Android工作室时我不知道怎么做,如果有人知道解决方案,或者你可以指导我如何访问属性来添加图书馆,我会感恩的

1 个答案:

答案 0 :(得分:0)

您定义的包名与清单中的包不同。因此,将主活动复制到正确的包中,清理项目并运行应用程序。 提及活动

  <activity
        android:name="package.Tanver"
        > </activity>