美文网首页Android问题解决方案积累
插件化Replugin: java.lang.NoClassDe

插件化Replugin: java.lang.NoClassDe

作者: 我在Bug的尽头等你 | 来源:发表于2020-04-07 17:14 被阅读0次

主应用集成发生崩溃,主要原因是Replugin未适配androidX

报错内容:

04-07 17:03:54.398 22719-22719/com.example.repluginhostapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.repluginhostapp, PID: 22719
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager;
at com.qihoo360.loader2.PmBase.registerReceiverAction(PmBase.java:632)
at com.qihoo360.loader2.PmBase.callAppCreate(PmBase.java:622)
at com.qihoo360.loader2.PMF.callAppCreate(PMF.java:84)
at com.qihoo360.replugin.RePluginApp.onCreate(RePlugin.java:1002) at com.qihoo360.replugin.RePluginApplication.onCreate(RePluginApplication.java:74) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4918) at android.app.ActivityThread.-wrap1(ActivityThread.java) at android.app.ActivityThreadH.handleMessage(ActivityThread.java:1530)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInitMethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769) Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager" on path: DexPathList[[zip file "/data/app/com.example.repluginhostapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.repluginhostapp-2/lib/arm64, /vendor/lib64, /system/lib64]] 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.qihoo360.loader2.PmBase.registerReceiverAction(PmBase.java:632) at com.qihoo360.loader2.PmBase.callAppCreate(PmBase.java:622) at com.qihoo360.loader2.PMF.callAppCreate(PMF.java:84) at com.qihoo360.replugin.RePluginApp.onCreate(RePlugin.java:1002)
at com.qihoo360.replugin.RePluginApplication.onCreate(RePluginApplication.java:74)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4918)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThreadH.handleMessage(ActivityThread.java:1530) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInitMethodAndArgsCaller.run(ZygoteInit.java:908)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
Suppressed: java.lang.ClassNotFoundException: android.support.v4.content.LocalBroadcastManager
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)
... 16 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

去replugin的官网查看了一下issues
点击进去可以看到大家遇到的问题,查看了一下,我这个问题是因为使用的编译版本过高导致的,我的版本信息如下图:

image.png

改完后:


image.png

亲测有效,安装应用不崩了。

相关文章

网友评论

    本文标题:插件化Replugin: java.lang.NoClassDe

    本文链接:https://www.haomeiwen.com/subject/lkinphtx.html