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

Abierto
#1,365 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
android, java
Área
mobile

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

大佬,请教下:
在某家车企的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

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

Lenguaje dominante
Java
Estrellas
7.8k
Forks
1.3k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Tencent/Shadow

Todos los issues de Tencent/Shadow

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.