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

模块 'app' 加载失败是为什么 我按文档配置了 #50

Closed
lovemianhuatang opened this issue Feb 1, 2020 · 5 comments
Closed

Comments

@lovemianhuatang
Copy link

image

版本是1.7.8 androidx

@xiaojinzi123
Copy link
Owner

xiaojinzi123 commented Feb 1, 2020

抱歉, 这两天我完善了一下文档没注意一个配置的更改.

在你初始化的时候, 你配置了链接中的配置, 里面 optimizeInit(true) 默认被我写成了 true, true 表示使用 ASM 技术加载模块, 需要额外配置一个 Gradle 插件. 用于加快初始化的速度.

如果你不想配置, 你也可以选择反射的方式, 两者性能所差无几. 你只需要把初始化的时候.

optimizeInit(false) 传入 false 即可, 或者直接删除. 默认就是 false.

如果你想配置, 请按照此链接配置

@lovemianhuatang
Copy link
Author

我配置了插件。但还是一样

@xiaojinzi123
Copy link
Owner

xiaojinzi123 commented Feb 1, 2020

我配置了插件。但还是一样

你配置了 Gradle 插件是不会有上面的问题的. 请注意是 Gradle 插件, 你已经配置的注解驱动器是生成代码的. 当你开启初始化优化开关, 你就需要一个额外的 Gradle 插件
如果你真的配置了插件. 但是还是上述的错误, 可能是几下几个错误:

  • 模块的名称没配置或者不匹配
  • 模块没有配置注解驱动器

如果你实在发现不了, 你可以加群, 我就是群主. 我会帮你解决的

@lovemianhuatang
Copy link
Author

我加了群。好像没动静

@lovemianhuatang
Copy link
Author

解决了 需要每个模块添加注解依赖

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

No branches or pull requests

2 participants