RePlugin icon indicating copy to clipboard operation
RePlugin copied to clipboard

RePlugin.getHostClassLoader() 为 null

Open ly2251 opened this issue 8 years ago • 0 comments

问题详细描述 Detailed description of the problem

RePlugin.getHostClassLoader() 获取为null

复现问题步骤 Steps to reproduce the problem

  1. Host 反射调用插件中的并类实例化
  2. 插件调用 RePlugin.getHostClassLoader() 反射Host 中的eventBus
  3. RePlugin.getHostClassLoader() 为null

其它重要信息 Other important information

replugin-host-lib/gradle Version: 2.3 rePlugin-plugin-lib/gradle Version: 2.3

Android API Version: Android 手机型号&ROM(Phone model & ROM):

Logcat上下文 Logcat context

-12 22:20:33.708 12246-12246/host.plugin.ly.com.rehost D/RePlugin.ws001: cached filename: nlp1.plugin.ly.com.renlp -> /data/user/0/host.plugin.ly.com.rehost/app_p_a/-2028445720.jar cached Dex /data/user/0/host.plugin.ly.com.rehost/app_p_a/-2028445720.jar -> com.qihoo360.replugin.PluginDexClassLoader[dexPath=/data/user/0/host.plugin.ly.com.rehost/app_p_a/-2028445720.jar,libraryPath=/data/data/host.plugin.ly.com.rehost/app_p_n/-2028445720] ---------- load host class ----------null 10-12 22:20:33.708 12246-12246/host.plugin.ly.com.rehost W/System.err: java.lang.NullPointerException at nlp1.plugin.ly.com.nlpbaselib.BaseNLP.startNLP(BaseNLP.java:28) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at host.plugin.ly.com.rehost.MainActivity$2.onClick(MainActivity.java:53) at android.view.View.performClick(View.java:4630) at android.view.View$PerformClick.run(View.java:19339) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5335) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) at dalvik.system.NativeStart.main(Native Method)

ly2251 avatar Oct 12 '18 14:10 ly2251