在Android12版本的车机上出现的兼容性问题

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

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

評価

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

調査の方向性

Start by reproducing the reported ClassNotFoundException on the affected Android 12 car head unit, then compare plugin startup with the Android 11 head unit and Android 12 emulator. The report points to PluginDefaultProxyActivity and the host manifest but gives no source file, test, or confirmed cause. Done means identifying and documenting a reproducible compatibility cause and a fix that allows the plugin to launch on the affected device.

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

説明

大佬,请教下:
在某家车企的Android12版本的车机上启动插件会报错找不到com.tencent.shadow.sample.plugin.runtime.PluginDefaultProxyActivity,在宿主的manifest文件中也有正常注册,关键是在另一款Android11的车机和Android12的模拟器上启动插件就没有问题,很奇怪的一个报错。
使用shadow的demo也试了下,也是同样的在Android11的车机上正常启动插件,在Android12的车机上启动插件会报相同的错误,具体报错信息如下:
FATAL EXCEPTION: main
Process: com.kernelsoft.exampleapp119, PID: 19859
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.kernelsoft.exampleapp119/com.tencent.shadow.sample.plugin.runtime.PluginDefaultProxyActivity}: java.lang.ClassNotFoundException: Didn't find class "com.tencent.shadow.sample.plugin.runtime.PluginDefaultProxyActivity" on path: DexPathList[[zip file "/data/app/~~JjNcPsG65Y9BZxie_Hl_GQ==/com.kernelsoft.exampleapp119-9ODCBWiltcBlBjvJAgmf3Q==/base.apk"],nativeLibraryDirectories=[/data/app/~~JjNcPsG65Y9BZxie_Hl_GQ==/com.kernelsoft.exampleapp119-9ODCBWiltcBlBjvJAgmf3Q==/lib/arm64, /data/app/~~JjNcPsG65Y9BZxie_Hl_GQ==/com.kernelsoft.exampleapp119-9ODCBWiltcBlBjvJAgmf3Q==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3613)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:297)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037)

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tencent.shadow.sample.plugin.runtime.PluginDefaultProxyActivity" on path: DexPathList[[zip file "/data/app/~~JjNcPsG65Y9BZxie_Hl_GQ==/com.kernelsoft.exampleapp119-9ODCBWiltcBlBjvJAgmf3Q==/base.apk"],nativeLibraryDirectories=[/data/app/~~JjNcPsG65Y9BZxie_Hl_GQ==/com.kernelsoft.exampleapp119-9ODCBWiltcBlBjvJAgmf3Q==/lib/arm64, /data/app/~~JjNcPsG65Y9BZxie_Hl_GQ==/com.kernelsoft.exampleapp119-9ODCBWiltcBlBjvJAgmf3Q==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
at android.app.Instrumentation.newActivity(Instrumentation.java:1285)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3600)
... 12 more

目前的一个思路就是这款车机的类加载机制可能魔改的比较多,出现了兼容性问题

主要言語
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 を短くまとめたダイジェスト。