limpoxe / android-plugin-framework Goto Github PK
View Code? Open in Web Editor NEWAndroid插件框架,免安装运行插件APK ,支持独立插件和非独立插件
License: MIT License
Android插件框架,免安装运行插件APK ,支持独立插件和非独立插件
License: MIT License
如题,测试了启动失败
文档写的很不清楚,光靠文档不明白如何使用,希望以后能把文档写的更加详细
在Fragment里面startActivity会提示没有在manifest里面注册,需要getActivity().startActivity
我在Demo项目上使用时,生成了宿主工程的所有Class文件,使用起来没问题,但是在我自己的项目中使用时,在非独立插件中,只能使用到宿主工程的所有依赖库,但是却不能使用宿主工程自己的Class,然后我在宿主工程的app-Debug.jar中找到了很多宿主工程依赖库的Class,却没有一个宿主工程的Class...
我的宿主工程非常大,使用的依赖库很多,会不会跟这个有关..求大神解答.
Hi, please could you add English readme.md file ?
Best regards.
在插件中怎么监听 主程序中的registerOnSharedPreferenceChangeListener
请问大神,编译官方的demo只需要在as右边的gradle命令里操作PluginMain宿主工程,先clean,再build就可以了是吗?或者大神给个编译的具体流程?跪求,比心♥
我写了个测试工程,然后把apk包放进去发现提示MainActivity找不到类。我把你的sample里面的helloworld放到独立工程中打包放到assert里面,提示Applicaiton找不到
异常日志
06-04 13:20:28.760 2770-2770/com.born.mobile.wom.inside E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.born.mobile.wom.inside, PID: 2770
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.born.mobile.wom.inside/com.born.mobile.wom.inside.stub.PluginStubActivity0}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.born.mobile.wom.inside/com.example.pluginstudy.testwidget.tab.Tab1Activity}: java.lang.reflect.UndeclaredThrowableException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2348)
at android.app.ActivityThread.access$1100(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259)
at com.plugin.core.PluginAppTrace.handleMessage(PluginAppTrace.java:41)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5327)
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:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.born.mobile.wom.inside/com.example.pluginstudy.testwidget.tab.Tab1Activity}: java.lang.reflect.UndeclaredThrowableException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2138)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:806)
at android.widget.TabHost.setCurrentTab(TabHost.java:439)
at android.widget.TabHost.addTab(TabHost.java:259)
at com.example.pluginstudy.testwidget.TabHostViewActivity.onCreate(TabHostViewActivity.java:27)
at android.app.Activity.performCreate(Activity.java:5285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:167)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2348)
at android.app.ActivityThread.access$1100(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259)
at com.plugin.core.PluginAppTrace.handleMessage(PluginAppTrace.java:41)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5327)
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:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy0.registerReceiver(Native Method)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1545)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1513)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1507)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
at com.plugin.core.PluginContextTheme.registerReceiver(PluginContextTheme.java:187)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
at com.example.pluginstudy.testwidget.tab.Tab1Activity.onCreate(Tab1Activity.java:44)
at android.app.Activity.performCreate(Activity.java:5285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:167)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2138)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:806)
at android.widget.TabHost.setCurrentTab(TabHost.java:439)
at android.widget.TabHost.addTab(TabHost.java:259)
at com.example.pluginstudy.testwidget.TabHostViewActivity.onCreate(TabHostViewActivity.java:27)
at android.app.Activity.performCreate(Activity.java:5285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:167)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2348)
at android.app.ActivityThread.access$1100(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259)
at com.plugin.core.PluginAppTrace.handleMessage(PluginAppTrace.java:41)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5327)
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:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.plugin.core.proxy.MethodHandler.invoke(MethodHandler.java:37)
at $Proxy0.registerReceiver(Native Method)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1545)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1513)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1507)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
at com.plugin.core.PluginContextTheme.registerReceiver(PluginContextTheme.java:187)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
at com.example.pluginstudy.testwidget.tab.Tab1Activity.onCreate(Tab1Activity.java:44)
at android.app.Activity.performCreate(Activity.java:5285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:167)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2138)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:806)
at android.widget.TabHost.setCurrentTab(TabHost.java:439)
at android.widget.TabHost.addTab(TabHost.java:259)
at com.example.pluginstudy.testwidget.TabHostViewActivity.onCreate(TabHostViewActivity.java:27)
at android.app.Activity.performCreate(Activity.java:5285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:167)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2348)
at android.app.ActivityThread.access$1100(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259)
at com.plugin.core.PluginAppTrace.handleMessage(PluginAppTrace.java:41)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5327)
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:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Given caller package com.example.pluginstudy is not running in process ProcessRecord{44cc9660 2770:com.born.mobile.wom.inside/u0a772}
at android.os.Parcel.readException(Parcel.java:1468)
at android.os.Parcel.readException(Parcel.java:1422)
at android.app.ActivityManagerProxy.registerReceiver(ActivityManagerNative.java:2347)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.plugin.core.proxy.MethodHandler.invoke(MethodHandler.java:37)
at $Proxy0.registerReceiver(Native Method)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1545)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1513)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1507)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
at com.plugin.core.PluginContextTheme.registerReceiver(PluginContextTheme.java:187)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
at com.example.pluginstudy.testwidget.tab.Tab1Activity.onCreate(Tab1Activity.java:44)
at android.app.Activity.performCreate(Activity.java:5285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:167)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2138)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:806)
at android.widget.TabHost.setCurrentTab(TabHost.java:439)
at android.widget.TabHost.addTab(TabHost.java:259)
at com.example.pluginstudy.testwidget.TabHostViewActivity.onCreate(TabHostViewActivity.java:27)
at android.app.Activity.performCreate(Activity.java:5285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:167)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2348)
at android.app.ActivityThread.access$1100(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259)
at com.plugin.core.PluginAppTrace.handleMessage(PluginAppTrace.java:41)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5327)
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:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
at dalvik.system.NativeStart.main(Native Method)
openAtlasExtention 完全搜不到资料了,我只想用用定制的aapt呀。。。
卡点的手机常见,如华为P7,看logcat可以发现点击事件有触发,而界面还是前一个页面
插件无法使用宿主程序主题:
提示错误:Type identifier 0x39 is larger than type count 0x8
基于约束的插件都已经被搞的遍地开花了,基于插件技术构建一个真正的能托管第三方APP的虚拟空间才是目前的瓶颈呢
java.lang.NullPointerException
Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.res.Resources.newTheme()' on a null object reference
com.limpoxe.fairy.core.d.c(PluginContextTheme.java:140)
com.limpoxe.fairy.core.d.setTheme(PluginContextTheme.java:99)
com.limpoxe.fairy.core.PluginLauncher.startPlugin(PluginLauncher.java:121)
com.limpoxe.fairy.core.loading.WaitForLoadingPluginActivity$1.run(WaitForLoadingPluginActivity.java:72)
java.lang.Thread.run(Thread.java:818)
出现该问题的都是OPPO机器
今晚做了一个demo测试了一下,发现再使用bindService的时候出现了错误
宿主有四个 TAB ,TAB 的内容从插件中加载出来,嵌入到宿主中
华为Mate8 NXT-AL10 系统: 6.0
华为SCL-AL00 系统:5.1.1
华为MT7-TL10 系统: 6.0
发送自定义布局通知出现异常,可能会出现跳转黑屏、邮件、短信、手机主屏的情况
###异常日志
android.app.RemoteServiceException: Bad notification posted from package com.born.mobile.wom.inside: Couldn't expand RemoteViews for: StatusBarNotification(pkg=com.born.mobile.wom.inside user=UserHandle{0} id=1 tag=null score=0 key=0|com.born.mobile.wom.inside|1|null|10192: Notification(pri=0 contentView=com.born.mobile.wom.inside/0x7f040057 vibrate=null sound=null tick defaults=0x0 flags=0x10 color=0x00000000 vis=PRIVATE))
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532)
at com.plugin.core.PluginAppTrace.handleMessage(PluginAppTrace.java:41)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5546)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:682)
Android O 适配:ActivityManagerNative没有gDefault字段导致反射失败
Nexus 5, Android 7.1.1 CM 插件通知未显示插件ICON
Hi ! 请问插件和插件之间,插件和宿主之间可以互访数据库吗?
why? 退出重进的话也会出现很多类无法强转的问题
在宿主中使用 startActivityForResult 启动插件的Activity,从插件回到宿主时,无法回调宿主的onActivityResult方法,
是否现在还不支持,我用的是独立插件,求使用方法。
根据插件版本比对,验证签名等等
如何获取未安装插件APK的名称,也就是Application的Label的值。目前获取的值为一个@开头的资源ID,但是无法获取到它对应的string值。获取安装后的插件的label值,则Label值变成了packageName了。请问这个问题如何解决?大神
由于Fragment.instantiate()内部存在一个静态成员变量sClassMap,用于缓存Fragment的class。
可能会导致在插件热更新后或者不同插件实例包含同名Fragment时,Fragment的class的缓存没有正常更新导致A Class Cast To A异常。
Error:Execution failed for task ':plugintest:mergeDebugResources'.
java.lang.ArrayIndexOutOfBoundsException (no error message)
如果Plugin类中需要Activity类型的Context,PluginContextTheme强转会发生异常,求助博主~
发现4.x系统有这个问题,以下机型复现
HM 2A 系统4.4.4
CHM-UL00 系统4.4.2
vivo X5Max l 系统4.4.4
三星SCH-I679 系统4.3
三星Galaxy Tab 3 8.0 系统4.2.2
日志
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.demo.solo/com.demo.solo.stub.PluginStubActivityStandard1}: android.view.InflateException: Binary XML file line #8: Error inflating class com.demo.tuna.GuitarTunaView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2249)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.demo.tuna.GuitarTunaView
at android.view.LayoutInflater.createView(LayoutInflater.java:619)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:693)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.demo.solo.plugin.instrument.TunaActivity.onCreate(TunaActivity.java:47)
at android.app.Activity.performCreate(Activity.java:5255)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:285)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:593)
... 24 more
Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at com.demo.tuna.InstrumentTunaView.(InstrumentTunaView.java:101)
at com.demo.tuna.GuitarTunaView.(GuitarTunaView.java:19)
... 27 more
android.view.InflateException: Binary XML file line #8: Error inflating class com.demo.tuna.GuitarTunaView
at android.view.LayoutInflater.createView(LayoutInflater.java:619)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:693)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.demo.solo.plugin.instrument.TunaActivity.onCreate(TunaActivity.java:47)
at android.app.Activity.performCreate(Activity.java:5255)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:285)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:593)
... 24 more
Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at com.demo.tuna.InstrumentTunaView.(InstrumentTunaView.java:101)
at com.demo.tuna.GuitarTunaView.(GuitarTunaView.java:19)
... 27 more
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:593)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:693)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.demo.solo.plugin.instrument.TunaActivity.onCreate(TunaActivity.java:47)
at android.app.Activity.performCreate(Activity.java:5255)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:285)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at com.demo.tuna.InstrumentTunaView.(InstrumentTunaView.java:101)
at com.demo.tuna.GuitarTunaView.(GuitarTunaView.java:19)
... 27 more
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at com.demo.tuna.InstrumentTunaView.(InstrumentTunaView.java:101)
at com.demo.tuna.GuitarTunaView.(GuitarTunaView.java:19)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:593)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:693)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.demo.solo.plugin.instrument.TunaActivity.onCreate(TunaActivity.java:47)
at android.app.Activity.performCreate(Activity.java:5255)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:285)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
插件PopupWindow/Dialog弹窗动画不生效
插件中的AccessibilityService 有办法支持吗
从宿主获取Plugin的Context有什么好的方法可以获取么?
为什么我的apk放进去,启动的时候显示主类找不到啊
运行环境:HUAWEI PE-TL10,Android 6.0,API 23
错误日志:
03-23 14:34:37.838 26962-26975/com.example.pluginmain E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:38.039 26989-27002/com.example.pluginmain:plugin E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] JNI ERROR (app bug): local reference table overflow (max=512)
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] local reference table dump:
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Last 10 entries (of 512):
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 511: 0x1304e740 java.lang.Object[](4 elements)
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 510: 0x1306c250 java.lang.reflect.Method
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 509: 0x12e092e0 java.lang.String "com.plugin.core.... (45 chars)
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 508: 0x12cc7ce0 android.app.ActivityThread$ApplicationThread
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 507: 0x12d864a0 $Proxy3
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 506: 0x12d864a0 $Proxy3
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 505: 0x12f4d0a0 java.lang.Object[](3 elements)
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 504: 0x12f4e9a0 java.lang.reflect.Method
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 503: 0x1306b840 java.lang.String "com.example.plug... (22 chars)
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 502: 0x12dfd7e0 $Proxy5
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Summary:
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of $Proxy3 (1 unique instances)
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 200 of $Proxy5 (1 unique instances)
03-23 14:34:38.636 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 100 of java.lang.Object[](3 elements) (100 unique instances)
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.Object[](4 elements)
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of java.lang.Class (2 unique instances)
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.String[](3 elements)
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 104 of java.lang.String (104 unique instances)
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 101 of java.lang.reflect.Method (101 unique instances)
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of android.app.ActivityThread$ApplicationThread
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115]
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368] Runtime aborting...
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368]
03-23 14:34:38.637 26989-26989/com.example.pluginmain:plugin A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 26989 (uginmain:plugin)
03-23 14:34:39.219 27029-27042/com.example.pluginmain:plugin E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] JNI ERROR (app bug): local reference table overflow (max=512)
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] local reference table dump:
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Last 10 entries (of 512):
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 511: 0x12ec5bc0 java.lang.Object[](4 elements)
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 510: 0x12efbac0 java.lang.reflect.Method
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 509: 0x12e0a350 java.lang.String "com.plugin.core.... (45 chars)
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 508: 0x12cca0c0 android.app.ActivityThread$ApplicationThread
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 507: 0x12d86530 $Proxy3
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 506: 0x12d86530 $Proxy3
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 505: 0x12e43560 java.lang.Object[](3 elements)
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 504: 0x12e602e0 java.lang.reflect.Method
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 503: 0x12e8bac0 java.lang.String "com.example.plug... (22 chars)
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 502: 0x12dfd870 $Proxy5
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Summary:
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of $Proxy3 (1 unique instances)
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 200 of $Proxy5 (1 unique instances)
03-23 14:34:39.903 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 100 of java.lang.Object[](3 elements) (100 unique instances)
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.Object[](4 elements)
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of java.lang.Class (2 unique instances)
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.String[](3 elements)
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 104 of java.lang.String (104 unique instances)
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 101 of java.lang.reflect.Method (101 unique instances)
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of android.app.ActivityThread$ApplicationThread
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115]
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368] Runtime aborting...
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368]
03-23 14:34:39.904 27029-27029/com.example.pluginmain:plugin A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 27029 (uginmain:plugin)
03-23 14:34:40.628 27072-27104/com.example.pluginmain:plugin E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:40.646 27086-27105/com.example.pluginmain E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:41.313 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] JNI ERROR (app bug): local reference table overflow (max=512)
03-23 14:34:41.313 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] local reference table dump:
03-23 14:34:41.313 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Last 10 entries (of 512):
03-23 14:34:41.313 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 511: 0x13019160 java.lang.Object[](4 elements)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 510: 0x1301a370 java.lang.reflect.Method
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 509: 0x12e0b350 java.lang.String "com.plugin.core.... (45 chars)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 508: 0x12cca8e0 android.app.ActivityThread$ApplicationThread
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 507: 0x12d885c0 $Proxy3
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 506: 0x12d885c0 $Proxy3
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 505: 0x12f06a40 java.lang.Object[](3 elements)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 504: 0x12f0ea60 java.lang.reflect.Method
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 503: 0x13030500 java.lang.String "com.example.plug... (22 chars)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 502: 0x12dfe900 $Proxy5
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Summary:
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of $Proxy3 (1 unique instances)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 200 of $Proxy5 (1 unique instances)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 100 of java.lang.Object[](3 elements) (100 unique instances)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.Object[](4 elements)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of java.lang.Class (2 unique instances)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.String[](3 elements)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 104 of java.lang.String (104 unique instances)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 101 of java.lang.reflect.Method (101 unique instances)
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of android.app.ActivityThread$ApplicationThread
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115]
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368] Runtime aborting...
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368]
03-23 14:34:41.314 27072-27072/com.example.pluginmain:plugin A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 27072 (uginmain:plugin)
03-23 14:34:42.007 27147-27177/com.example.pluginmain:plugin E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:42.091 27163-27179/com.example.pluginmain E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] JNI ERROR (app bug): local reference table overflow (max=512)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] local reference table dump:
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Last 10 entries (of 512):
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 511: 0x1314bd80 java.lang.Object[](4 elements)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 510: 0x13139610 java.lang.reflect.Method
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 509: 0x12e0d3c0 java.lang.String "com.plugin.core.... (45 chars)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 508: 0x12cdb0c0 android.app.ActivityThread$ApplicationThread
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 507: 0x12d8d6e0 $Proxy3
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 506: 0x12d8d6e0 $Proxy3
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 505: 0x130186a0 java.lang.Object[](3 elements)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 504: 0x12ffed60 java.lang.reflect.Method
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 503: 0x132ea040 java.lang.String "com.example.plug... (22 chars)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 502: 0x12dfda20 $Proxy5
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Summary:
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of $Proxy3 (1 unique instances)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 200 of $Proxy5 (1 unique instances)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 100 of java.lang.Object[](3 elements) (100 unique instances)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.Object[](4 elements)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of java.lang.Class (2 unique instances)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.String[](3 elements)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 104 of java.lang.String (104 unique instances)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 101 of java.lang.reflect.Method (101 unique instances)
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of android.app.ActivityThread$ApplicationThread
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115]
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368] Runtime aborting...
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368]
03-23 14:34:42.696 27147-27147/com.example.pluginmain:plugin A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 27147 (uginmain:plugin)
03-23 14:34:43.432 27223-27238/com.example.pluginmain:plugin E/HAL: load: id=gralloc != hmi->id=gralloc
03-23 14:34:44.098 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] JNI ERROR (app bug): local reference table overflow (max=512)
03-23 14:34:44.098 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] local reference table dump:
03-23 14:34:44.098 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Last 10 entries (of 512):
03-23 14:34:44.098 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 511: 0x1301c3c0 java.lang.Object[](4 elements)
03-23 14:34:44.098 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 510: 0x13034f10 java.lang.reflect.Method
03-23 14:34:44.098 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 509: 0x12dd3430 java.lang.String "com.plugin.core.... (45 chars)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 508: 0x12cd8ce0 android.app.ActivityThread$ApplicationThread
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 507: 0x12d8f800 $Proxy3
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 506: 0x12d8f800 $Proxy3
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 505: 0x12f3cda0 java.lang.Object[](3 elements)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 504: 0x12f4b6a0 java.lang.reflect.Method
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 503: 0x12ff0f00 java.lang.String "com.example.plug... (22 chars)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 502: 0x12dffb40 $Proxy5
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] Summary:
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of $Proxy3 (1 unique instances)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 200 of $Proxy5 (1 unique instances)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 100 of java.lang.Object[](3 elements) (100 unique instances)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.Object[](4 elements)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 2 of java.lang.Class (2 unique instances)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of java.lang.String[](3 elements)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 104 of java.lang.String (104 unique instances)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 101 of java.lang.reflect.Method (101 unique instances)
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115] 1 of android.app.ActivityThread$ApplicationThread
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/indirect_reference_table.cc:115]
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368] Runtime aborting...
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/art: art/runtime/runtime.cc:368]
03-23 14:34:44.099 27223-27223/com.example.pluginmain:plugin A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 27223 (uginmain:plugin)
7.979 13589-13589/com.example.pluginmain:plugin E/Log_StackTrace: 记录错误日志
android.view.InflateException: Binary XML file line #76: Binary XML file line #76: Error inflating class com.example.plugintest.view.PluginTestLayout
at android.view.LayoutInflater.inflate(LayoutInflater.java:543)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.example.plugintest.fragment.PluginNormalFragment.onCreateView(PluginNormalFragment.java:34)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2184)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298)
at android.support.v4.app.FragmentManagerImpl.moveFragmentsToInvisible(FragmentManager.java:2323)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2136)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2092)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1998)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:607)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:181)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1238)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnStart(PluginInstrumentionWrapper.java:344)
at android.app.Activity.performStart(Activity.java:6320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2399)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2496)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5457)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: android.view.InflateException: Binary XML file line #76: Error inflating class com.example.plugintest.view.PluginTestLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:649)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:768)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:842)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.example.plugintest.fragment.PluginNormalFragment.onCreateView(PluginNormalFragment.java:34)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2184)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298)
at android.support.v4.app.FragmentManagerImpl.moveFragmentsToInvisible(FragmentManager.java:2323)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2136)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2092)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1998)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:607)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:181)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1238)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnStart(PluginInstrumentionWrapper.java:344)
at android.app.Activity.performStart(Activity.java:6320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2399)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2496)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5457)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:623)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:768)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:842)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.example.plugintest.fragment.PluginNormalFragment.onCreateView(PluginNormalFragment.java:34)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2184)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298)
at android.support.v4.app.FragmentManagerImpl.moveFragmentsToInvisible(FragmentManager.java:2323)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2136)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2092)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1998)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:607)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:181)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1238)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnStart(PluginInstrumentionWrapper.java:344)
at android.app.Activity.performStart(Activity.java:6320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2399)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2496)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5457)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.NumberFormatException: Invalid int: "left|right"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:410)
at java.lang.Integer.parseInt(Integer.java:367)
at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:133)
at android.content.res.TypedArray.getInt(TypedArray.java:357)
at com.example.plugintest.view.PluginTestLayout.(PluginTestLayout.java:28)
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:623)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:768)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:842)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.example.plugintest.fragment.PluginNormalFragment.onCreateView(PluginNormalFragment.java:34)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2184)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298)
at android.support.v4.app.FragmentManagerImpl.moveFragmentsToInvisible(FragmentManager.java:2323)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2136)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2092)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1998)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:607)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:181)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1238)
at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnStart(PluginInstrumentionWrapper.java:344)
at android.app.Activity.performStart(Activity.java:6320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2399)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2496)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5457)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
02-06 17:38:57.979 13589-13589/com.example.pluginmain:plugin D/AndroidRuntime: Shutting down VM
修改 PluginTest 工程下的 com.example.plugintest.fragment.PluginNormalFragment 这个类,在 public void onClick(View v) 函数的最开头位置,加入如下测试代码:
new AlertDialog.Builder(getContext()).setTitle("测试测试").
setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
Toast.makeText(getContext(), "你点了确定",
Toast.LENGTH_SHORT).show();
}
}).
setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
}).show();
然后打开测试页面,点击“打开PLUGINNORMALFRAGMENT”,继续点击“来自插件的文字”,手机重启。
手机型号:华为X1 和 华为荣耀6PLUS,Android版本:4.4.2
Hi , I developed an app and use Weex (A framework for building Mobile cross-platform UI by Aliibaba), generate an apk as a plugin, can install successfully, but it crashed when click to open.
nexus6p,7.1.1上的crash
安装完成后打开,点击”打开插件,PluginHelloWorld“,会crash,日志如下。
如果点了最后一个”测试宿主tabActivity内嵌插件Activity“,然后再点击”打开插件,PluginHelloWorld“,就可以正常运行了。
android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class org.chromium.chrome.browser.widget.accessibility.AccessibilityTabModelListItem Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class org.chromium.chrome.browser.widget.accessibility.AccessibilityTabModelListItem Caused by: java.lang.ClassNotFoundException: Didn't find class "org.chromium.chrome.browser.widget.accessibility.AccessibilityTabModelListItem" on path: DexPathList[[zip file "/data/user/0/com.example.pluginmain/app_plugin_dir/com.example.pluginhelloworld/1.0.1_2/base-1.apk"],nativeLibraryDirectories=[/data/user/0/com.example.pluginmain/app_plugin_dir/com.example.pluginhelloworld/1.0.1_2/lib, /system/lib, /vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at com.limpoxe.fairy.core.PluginClassLoader.findClass(PluginClassLoader.java:101) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at android.view.LayoutInflater.createView(LayoutInflater.java:609) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at android.view.LayoutInflater.inflate(LayoutInflater.java:377) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:136) at com.example.pluginhelloworld.WelcomeActivity.onCreate(WelcomeActivity.java:52) at android.app.Activity.performCreate(Activity.java:6679) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at com.limpoxe.fairy.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:279) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at com.limpoxe.fairy.core.PluginAppTrace.handleMessage(PluginAppTrace.java:40) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
实际上获取的是配置在宿主的Application类型的Context
您好:
我将你的工程clone下来,plugintest的style.xml下的Theme.AppCompat.Light 报错请问什么原因?
其次,wxsdklibrary下的com.plugin.core.annotation.ComponentContainer导入错误,编译报如下错误:
黑屏:
Intent intent = new Intent(this, DesignActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
不黑屏:
Intent intent = new Intent(this, DesignActivity.class);
startActivity(intent);
看起了是有什么耗时操作短暂阻塞了主线程
插件中的布局文件如果在view里定义了android:onClick属性,运行时会crash
错误信息如下:
java.lang.IllegalStateException: Could not find method buttonOnclick(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.widget.Button with id 'btn_comment'
at android.view.View$DeclaredOnClickListener.resolveMethod(View.java:4767)
at android.view.View$DeclaredOnClickListener.onClick(View.java:4731)
at android.view.View.performClick(View.java:5697)
at android.widget.TextView.performClick(TextView.java:10795)
at android.view.View$PerformClick.run(View.java:22526)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7197)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1232)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1122)
请问大神,这个框架能够实现热修复吗
在加载我自己定义的apk,在启动activity时,
发现在调用 resetActivityContext 函数时,
这一段代码
// 重设theme
if (pluginAppTheme != 0) {
RefInvoker.setFieldObject(activity, ContextThemeWrapper.class.getName(), android_content_ContextThemeWrapper_mTheme, null);
activity.setTheme(pluginAppTheme);
}
在运行时,有点像死锁,不过线程的状态还是RUNNABLE,但 activity.setTheme(pluginAppTheme);这语句就是不返回。 手机是华为的荣耀4. 应该是调用native的方法android_content_AssetManager_applyThemeStyle没有返回,一直在运行。
"<1> main@830026030872" prio=5 runnable
java.lang.Thread.State: RUNNABLE
at android.content.res.AssetManager.applyThemeStyle(AssetManager.java:-1)
at android.content.res.Resources$Theme.applyStyle(Resources.java:1256)
at android.view.ContextThemeWrapper.onApplyThemeResource(ContextThemeWrapper.java:132)
at android.app.Activity.onApplyThemeResource(Activity.java:3413)
at android.view.ContextThemeWrapper.initializeTheme(ContextThemeWrapper.java:144)
at android.view.ContextThemeWrapper.setTheme(ContextThemeWrapper.java:89)
at android.support.v7.app.AppCompatActivity.setTheme(AppCompatActivity.java:89)
at com.plugin.core.PluginInjector.resetActivityContext(PluginInjector.java:221)
at com.plugin.core.PluginInjector.injectActivityContext(PluginInjector.java:185)
at com.plugin.core.PluginInstrumentionWrapper.callActivityOnCreate(PluginInstrumentionWrapper.java:145)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2228)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313)
at android.app.ActivityThread.access$1100(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)
at com.plugin.core.PluginAppTrace.handleMessage(PluginAppTrace.java:41)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Method.java:-1)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
at dalvik.system.NativeStart.main(NativeStart.java:-1)
"<7> FinalizerDaemon@830030521168" daemon prio=5 waiting
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Object.java:-1)
at java.lang.Object.wait(Object.java:401)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
at java.lang.Thread.run(Thread.java:841)
"<8> FinalizerWatchdogDaemon@830030521600" daemon prio=5 waiting
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Object.java:-1)
at java.lang.Object.wait(Object.java:364)
at java.lang.Daemons$FinalizerWatchdogDaemon.waitForObject(Daemons.java:230)
at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:207)
at java.lang.Thread.run(Thread.java:841)
"<6> ReferenceQueueDaemon@830030520808" daemon prio=5 waiting
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Object.java:-1)
at java.lang.Object.wait(Object.java:364)
at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:130)
at java.lang.Thread.run(Thread.java:841)
"<10> Binder_2@830030544912" prio=5 runnable
java.lang.Thread.State: RUNNABLE
at dalvik.system.NativeStart.run(NativeStart.java:-1)
"<9> Binder_1@830030544672" prio=5 runnable
java.lang.Thread.State: RUNNABLE
at dalvik.system.NativeStart.run(NativeStart.java:-1)
"<5> Compiler@830030520568" daemon prio=5 waiting
java.lang.Thread.State: WAITING
at dalvik.system.NativeStart.run(NativeStart.java:-1)
"<3> Signal Catcher@830030520088" daemon prio=5 waiting
java.lang.Thread.State: WAITING
at dalvik.system.NativeStart.run(NativeStart.java:-1)
"<2> GC@830030519864" daemon prio=5 waiting
java.lang.Thread.State: WAITING
at dalvik.system.NativeStart.run(NativeStart.java:-1)
友盟分享库在宿主中,插件使用友盟分享时 友盟库会调用getIdentifier方法,传入的是宿主的包名,找不到资源Id(代码已经查看是最新)
在PluginResourceWrapper --> getIdentifier断点调试
将return super.getIdentifier(entry, type, packageName);
替换为return superGetIdentifier(entry, type, packageName);
private int superGetIdentifier(String name, String type, String packageName) {
int id = super.getIdentifier(name, type, packageName);
if (id <= 0) {//找不到资源
//切换包名,继续查找资源
if (PluginLoader.getApplicatoin().getPackageName().equals(packageName)) {
packageName = mPluginDescriptor.getPackageName();
} else {
packageName = PluginLoader.getApplicatoin().getPackageName();
}
id = super.getIdentifier(name, type, packageName);
}
return id;
}
目前这个方案能解决现有的问题,但是不知道是否会引起其他问题。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.