我在我的Android项目中使用Dagger 2,但是我在调试时遇到了困难。我知道编译失败是因为我的Dagger 2设置存在错误(之前出现过),但是由于没有得到正确的错误信息告诉我问题出在哪里,所以几乎不可能找到它的原因。所有我收到的消息只是显示注释处理失败的信息,例如:
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Error:(14, 28) error: cannot find symbol class BR
Error:(17, 40) error: package com.some.package.databinding does not exist
Error:(17, 51) error: cannot find symbol class DaggerSomeComponent
...
也许这与我同时使用数据绑定有关!?
我正在使用Dagger 2.5、Gradle插件2.1.2和android-apt 1.8。
感谢您的帮助!
package com.some.package.databinding does not exist
,因此它无法找到该类。这个类是否存在于这个包中并且是public
的? - Vucko