我正在尝试使用这个库项目,所以我尝试运行示例应用程序(在/app/source/main/
Github 链接中),并且在MainActivity.java
导入时出现错误
import butterknife.InjectView;
并且在MainActivity.java
andVerticalLinearRecyclerViewSample.java
中,每次出现@InjectView(...)
注释时,我都会收到以下错误:
InjectView cannot be resolved to a type
那么我该怎么办呢?
我尝试了什么:
我见过这个问题。对我不起作用,在那里发表评论。
在步骤#3 之前,我已按照这些步骤包含黄油刀库。关于第 4 步,“确保 .apt_generated/ 文件夹位于您的项目根目录中......” - 该项目没有任何命名文件夹.apt-generated
或项目根文件夹中的任何内容。
注意:我实际使用的是 Eclipse,而且 Github 上的项目是针对 Android Studio 的,所以我在 eclipse 中创建了一个新项目,并从下载的 Android Studio 项目中复制了各个文件。我希望这不会产生影响。