Qihoo360 / RePlugin

RePlugin - A flexible, stable, easy-to-use Android Plug-in Framework
Apache License 2.0
7.25k stars 1.52k forks source link

androidx项目编译插件调起时异常 #931

Open KeWeize opened 4 years ago

KeWeize commented 4 years ago

问题详细描述 Detailed description of the problem

androidX项目编译插件apk,在宿主(也是androidx项目)中调起的

复现问题步骤 Steps to reproduce the problem

  1. 宿主项目为androidx项目,能正常调起suport包项目编译的插件,也能正常调起官方demo中编译的插件。
  2. androidx项目编译的插件在宿主中调起时奔溃。异常信息如下: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.widget.ContentFrameLayout.setId(int)' on a null object reference at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:845) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:543) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:166) at com.pilaipiwang.ppreplugins.OrderActivity2.onCreate(OrderActivity2.java:19) at android.app.Activity.performCreate(Activity.java:6080) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637) ... 奔溃原因为androidx包中一个原生类空指针。

个人分析是androidx兼容问题。如果RePlugin团队还在维护这个库,希望能尽快解决androidx相关问题。

其它重要信息 Other important information

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

Logcat上下文 Logcat context

angcyo commented 4 years ago

这个库, 大半年没有动静了.

真捉急.

要考虑对比一下, 其他大厂的库了.

froyohuang commented 4 years ago

“1. 宿主项目为androidx项目,能正常调起suport包项目编译的插件,也能正常调起官方demo中编译的插件。” 这个能做到么,我这边尝试并不行啊,能给个联系方式么

chengfei602 commented 4 years ago

androidX 宿主编译 ,错误: 程序包androidx.databinding不存在,你这个是又遇到没 replugin-host-lib/gradle Version: 2.3.3

froyohuang commented 4 years ago

androidX 宿主编译 ,错误: 程序包androidx.databinding不存在,你这个是又遇到没 replugin-host-lib/gradle Version: 2.3.3

等不到官方,自己搞了一个兼容AndroidX的,可以看看 https://github.com/froyohuang/RePlugin-AndroidX