Ral*_*kum 6 android dependency-injection dagger-2
我想练习这个Dagger 2 Vehicle Motor示例.
除了我的gradel.build之外,我在教程中完成了所有内容:
compile 'com.google.dagger:dagger:2.4'
apt 'com.google.dagger:dagger-compiler:2.4'
compile 'javax.annotation:javax.annotation-api:1.2'
Run Code Online (Sandbox Code Playgroud)
但后来我得到了
错误:找不到符号变量Dagger_VehicleComponent
那有什么不对吗?(同样没有'_'下划线)
另一个版本解决了这个问题:
compile 'com.google.dagger:dagger:2.2'
apt 'com.google.dagger:dagger-compiler:2.2'
provided 'javax.annotation:jsr250-api:1.0'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7839 次 |
| 最近记录: |