alibaba / ARouter

💪 A framework for assisting in the renovation of Android componentization (帮助 Android App 进行组件化改造的路由框架)
Apache License 2.0
14.45k stars 2.61k forks source link

ARouter init logistics center exception #1018

Closed xiang23 closed 2 years ago

xiang23 commented 2 years ago

调用 ARouter.init 在AGP7.0.2的时候正常,升级到7.2.1的时候出现这个问题,因为我没使用自动注册插件,追了下代码,问题似乎出在编译生成的文件上 正常情况的routermap image 异常情况的routermap image

多生成了ExternalSynthetic$Condy0这个东西,然后通过反射时创建的就报错了

image
xiang23 commented 2 years ago

似乎是与jacoco冲突导致,关闭了就好了

blundell commented 2 months ago

Not sure "turning off Jacoco" is a solution 😆

This issue still persists and we see it with:

Arouter 1.3.0 AGP 8.4.1

We also use the

arouter-jailbird-plugin 1.0.2

The workaround was to use this plugin during the code coverage debug build as well. Like this in the config:

disableTransformWhenDebugBuild = false

image

That means we go into the path on 150, and avoid the path on 158 which causes the crash