解决Xposed提示java.lang.ClassNotFoundException: Didn't find class "com.xposeddemo.xposed.XposedInit"

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/u012400885/article/details/80322930

刚刚接触Xposed,感觉牛掰得不要不要得,简单写个demo后发现无效果,查看Xposed提示日志如下:

05-15 10:34:38.974 I/Xposed  ( 9022): -----------------
05-15 10:34:38.974 I/Xposed  ( 9022): Starting Xposed version 89, compiled for SDK 23
05-15 10:34:38.974 I/Xposed  ( 9022): Device: Nexus 5X (LGE), Android version 6.0.1 (SDK 23)
05-15 10:34:38.974 I/Xposed  ( 9022): ROM: MMB29P
05-15 10:34:38.974 I/Xposed  ( 9022): Build fingerprint: google/bullhead/bullhead:6.0.1/MMB29P/2473553:user/release-keys
05-15 10:34:38.974 I/Xposed  ( 9022): Platform: arm64-v8a, 64-bit binary, system server: yes
05-15 10:34:38.974 I/Xposed  ( 9022): SELinux enabled: yes, enforcing: yes
05-15 10:34:41.430 I/Xposed  ( 9022): -----------------
05-15 10:34:41.430 I/Xposed  ( 9022): Added Xposed (/system/framework/XposedBridge.jar) to CLASSPATH
05-15 10:34:41.538 I/Xposed  ( 9022): Detected ART runtime
05-15 10:34:41.542 I/Xposed  ( 9022): Found Xposed class 'de/robv/android/xposed/XposedBridge', now initializing
05-15 10:34:41.764 I/Xposed  ( 9022): Loading modules from /data/app/com.xposeddemo-1/base.apk
05-15 10:34:41.774 I/Xposed  ( 9022):   Loading class com.xposeddemo.xposed.XposedInit
05-15 10:34:41.775 E/Xposed  ( 9022):     Failed to load class com.xposeddemo.xposed.XposedInit
05-15 10:34:41.775 E/Xposed  ( 9022): java.lang.ClassNotFoundException: Didn't find class "com.xposeddemo.xposed.XposedInit" on path: DexPathList[[zip file "/data/app/com.xposeddemo-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
05-15 10:34:41.775 E/Xposed  ( 9022):   at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
05-15 10:34:41.775 E/Xposed  ( 9022):   at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
05-15 10:34:41.775 E/Xposed  ( 9022):   at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
05-15 10:34:41.775 E/Xposed  ( 9022):   at de.robv.android.xposed.XposedInit.loadModule(XposedInit.java:536)
05-15 10:34:41.775 E/Xposed  ( 9022):   at de.robv.android.xposed.XposedInit.loadModules(XposedInit.java:466)
05-15 10:34:41.775 E/Xposed  ( 9022):   at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:96)
05-15 10:34:41.775 E/Xposed  ( 9022):   Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.xposeddemo.xposed.XposedInit" on path: DexPathList[[zip file "/system/framework/XposedBridge.jar"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
05-15 10:34:41.775 E/Xposed  ( 9022):       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
05-15 10:34:41.775 E/Xposed  ( 9022):       at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
05-15 10:34:41.775 E/Xposed  ( 9022):       at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
05-15 10:34:41.775 E/Xposed  ( 9022):       ... 4 more
05-15 10:34:41.775 E/Xposed  ( 9022):       Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.xposeddemo.xposed.XposedInit" on path: DexPathList[[dex file "/data/dalvik-cache/xposed_XResourcesSuperClass.dex", dex file "/data/dalvik-cache/xposed_XTypedArraySuperClass.dex"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
05-15 10:34:41.775 E/Xposed  ( 9022):           at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
05-15 10:34:41.775 E/Xposed  ( 9022):           at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
05-15 10:34:41.775 E/Xposed  ( 9022):           at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
05-15 10:34:41.775 E/Xposed  ( 9022):           ... 5 more
05-15 10:34:41.775 E/Xposed  ( 9022):           Suppressed: java.lang.ClassNotFoundException: com.xposeddemo.xposed.XposedInit
05-15 10:34:41.775 E/Xposed  ( 9022):               at java.lang.Class.classForName(Native Method)
05-15 10:34:41.775 E/Xposed  ( 9022):               at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
05-15 10:34:41.775 E/Xposed  ( 9022):               at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
05-15 10:34:41.775 E/Xposed  ( 9022):               at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
05-15 10:34:41.775 E/Xposed  ( 9022):               ... 6 more
05-15 10:34:41.775 E/Xposed  ( 9022):           Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

从日志中可以看出,原因如下:

Failed to load class com.xposeddemo.xposed.XposedInit

首先再LZ检查确认前期配置无误时,只能耐心用三流得英文水准结合二流得翻译工具去理解一流得Fuck English。。。

官方API地址:

https://github.com/rovo89/XposedBridge/wiki/Using-the-Xposed-Framework-API

再下面有这样一段话,如下:

Please make sure to disable Instant Run (File -> Settings -> Build, Execution, Deployment -> Instant Run), otherwise your classes aren’t included directly in the APK, but loaded via a stub application which Xposed can’t handle.

翻译后大概意思如下:

请确保禁用Instant Run(File -> Settings -> Build, Execution, Deployment -> Instant Run),否则您的类不会直接包含在APK中,而是通过Xposed无法处理的存根应用程序加载。

咆哮一句:

What the fuck with worng!!!

Android Didn't find class "android.support.design.internal.NavigationMen

04-05

本人刚开始学习使用Meterdesign library 在使用NavigationView时 遇到以下情况,请教各位大神[img=http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/15.gif][/img][img=http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/15.gif][/img],rn[color=#FF0000]相同的项目在android studio上运行正常但在ecplices中运行会出错[/color]rn[color=#FF0000][size=24px]Didn't find class "android.support.design.internal.NavigationMenuView"[/size][/color]rnrn报错log:rn03-12 08:45:59.196: E/AndroidRuntime(26852): java.lang.RuntimeException: Unable to start activity ComponentInfocom.example.meterdesigndemo/com.example.meterdesigndemo.toolbar.CodeLabActivity: android.view.InflateException: Binary XML file line #90: Error inflating class android.support.design.widget.NavigationViewrn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2362)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.ActivityThread.access$700(ActivityThread.java:168)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1329)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.os.Handler.dispatchMessage(Handler.java:99)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.os.Looper.loop(Looper.java:177)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.ActivityThread.main(ActivityThread.java:5493)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at java.lang.reflect.Method.invokeNative(Native Method)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at java.lang.reflect.Method.invoke(Method.java:525)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1041)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at dalvik.system.NativeStart.main(Native Method)rn03-12 08:45:59.196: E/AndroidRuntime(26852): Caused by: android.view.InflateException: Binary XML file line #90: Error inflating class android.support.design.widget.NavigationViewrn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.createView(LayoutInflater.java:669)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:745)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.rInflate(LayoutInflater.java:804)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.inflate(LayoutInflater.java:526)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.inflate(LayoutInflater.java:426)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.inflate(LayoutInflater.java:382)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at com.example.meterdesigndemo.toolbar.CodeLabActivity.onCreate(CodeLabActivity.java:36)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.Activity.performCreate(Activity.java:5372)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270)rn03-12 08:45:59.196: E/AndroidRuntime(26852): ... 11 morern03-12 08:45:59.196: E/AndroidRuntime(26852): Caused by: java.lang.reflect.InvocationTargetExceptionrn03-12 08:45:59.196: E/AndroidRuntime(26852): at java.lang.reflect.Constructor.constructNative(Native Method)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.createView(LayoutInflater.java:643)rn03-12 08:45:59.196: E/AndroidRuntime(26852): ... 22 morern03-12 08:45:59.196: E/AndroidRuntime(26852): Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.design.internal.NavigationMenuViewrn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:756)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.inflate(LayoutInflater.java:498)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.inflate(LayoutInflater.java:426)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.support.design.internal.NavigationMenuPresenter.getMenuView(NavigationMenuPresenter.java:96)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.support.design.widget.NavigationView.(NavigationView.java:166)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.support.design.widget.NavigationView.(NavigationView.java:95)rn03-12 08:45:59.196: E/AndroidRuntime(26852): ... 25 morern03-12 08:45:59.196: E/AndroidRuntime(26852): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.internal.NavigationMenuView" on path: /data/app/com.example.meterdesigndemo-1.apkrn03-12 08:45:59.196: E/AndroidRuntime(26852): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.createView(LayoutInflater.java:608)rn03-12 08:45:59.196: E/AndroidRuntime(26852): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:745)rn03-12 08:45:59.196: E/AndroidRuntime(26852): ... 30 morern

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试