arouter 在腾讯shadow 单进程多插件中 初始化会引发 ARouter init logistics center exception!

オープン
#1,399 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
android, java
領域
backend, mobile

調査の方向性

Start with the stack trace and the ARouter initialization call in CommonBusinessApplication.onCreate; the exception occurs in LogisticsCenter.init while loading the plugin route class. Reproduce with multiple plugins in one process and compare that with initializing only one plugin. Done means ARouter initializes successfully for every plugin in the reported scenario, or the supported limitation and workaround are documented.

索引モデルが issue の本文から書いたものです。

説明

arouter在腾讯 shadow 框架中使用:

使用场景:
1、同一进程下,存在多个插件
2、每个插件都要使用arouter功能

在每个插件application中初始化 ARouter.init(application)的时候报如下错误:
备注:如果只是某一个插件中初始化arouter,并不会有问题,但是同一个进程下加载多个插件的时候就会出现以下异常,初步怀疑是同一进程下加载多个插件,路由信息重复注册了导致的问题?
请问下作者这个问题如何解决?

FATAL EXCEPTION: main
Process: com.seuic.kysy:takedeliveryplugin, PID: 6700
com.alibaba.android.arouter.exception.HandlerException: ARouter::ARouter init logistics center exception! [com.alibaba.android.arouter.routes.ARouter$$Root$$pluginqueryexpress]
at com.alibaba.android.arouter.core.LogisticsCenter.init(LogisticsCenter.java:196)
at com.alibaba.android.arouter.launcher._ARouter.init(_ARouter.java:63)
at com.alibaba.android.arouter.launcher.ARouter.init(ARouter.java:43)
at com.kye.pad.CommonBusinessApplication.onCreate(CommonBusinessApplication.java:31)
at com.tencent.shadow.core.loader.ShadowPluginLoader.callApplicationOnCreate$realAction(ShadowPluginLoader.kt:124)
at com.tencent.shadow.core.loader.ShadowPluginLoader.callApplicationOnCreate$lambda$4(ShadowPluginLoader.kt:132)
at com.tencent.shadow.core.loader.ShadowPluginLoader.$r8$lambda$5zn6PqYXr7Nxh2cuZZfK9BrbCmM(Unknown Source:0)
at com.tencent.shadow.core.loader.ShadowPluginLoader$$ExternalSyntheticLambda0.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7713)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)

主要言語
Java
スター
7.8k
フォーク
1.3k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Tencent/Shadow のほかの issue

Tencent/Shadow の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。