Butterknife 不会在 .apt_generated 目录中创建任何内容 [英] Butterknife does not create anything in .apt_generated directory

查看:31
本文介绍了Butterknife 不会在 .apt_generated 目录中创建任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Butterknife 进行注入,但在 .apt_generated 目录中没有看到任何生成的类.

I am trying to use Butterknife for injection, but I do not see any classes generated in the .apt_generated directory.

我正在使用 eclipse Kepler(服务版本 2),在我的项目属性中启用了注释处理并将 butterknife-5.0.0.jar 定义为工厂路径.

I am using eclipse Kepler (service release 2), enabled annotation processing in my project properties and defined the butterknife-5.0.0.jar as the annotation processor in the factory path.

我将 2 个视图注入到片段中进行测试,当我清理项目时,它已构建但没有生成任何内容.检查日志文件和 error_log 视图,我没有看到任何相关内容..

I have 2 views injected into a fragment for testing, and when I clean the project it is built but nothing is generated. Checking the log file and the error_log view I don't see anything related..

有什么想法吗?

推荐答案

我建议检查你是否编译并运行了你的应用程序.

I suggest to check if you compile and run your app.

或者,您的代码的其他部分可能有一些错误并且 IDE 无法构建.例如缺少 R.java 等.

Or, other parts of your codes may have some errors and the IDE isn't able to build. e.g R.java is missing etc.

这篇关于Butterknife 不会在 .apt_generated 目录中创建任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆