Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TheRouter.get() 返回 null #224

Closed
hust-twj opened this issue Jan 7, 2025 · 5 comments
Closed

TheRouter.get() 返回 null #224

hust-twj opened this issue Jan 7, 2025 · 5 comments
Labels

Comments

@hust-twj
Copy link

hust-twj commented Jan 7, 2025

获取跨模块依赖的服务:
1.2.4-rc3 :TheRouter.get() 返回正常
1.2.4-rc4 :TheRouter.get() 返回 null
是修复缓存引入的吗

@kymjs
Copy link
Collaborator

kymjs commented Jan 7, 2025

用新版本

@hust-twj
Copy link
Author

hust-twj commented Jan 7, 2025

用新版本

最新的 v1.2.4-rc6 版本有问题,回退,发现 1.2.4-rc4 就有问题了,但 1.2.4-rc3 没问题

@kymjs
Copy link
Collaborator

kymjs commented Jan 7, 2025

你建一个空工程试一下,我这边用AGP8、7,KSP,-rc3/4/6都是正常的

@hust-twj
Copy link
Author

hust-twj commented Jan 8, 2025

我建了个工程:https://github.com/hust-twj/TheRouterTest ,修改 libs.versions.toml theRouter 的版本,能够复现这个问题:
1.2.4-rc3 的时候:App.ktLog.e("twj124", "onCreate:" + getAppProvider()) 打印结果不为 null
1.2.4-rc4 的时候:App.ktLog.e("twj124", "onCreate:" + getAppProvider()) 打印结果为 null

看了下原因,应该是字节码插桩的问题
image
左边是1.2.4-rc4的, 右边是1.2.4-rc3

@kymjs
Copy link
Collaborator

kymjs commented Jan 13, 2025

1.2.4-rc12 已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants