Butterknife Does Not Create Anything In .apt_generated Directory
I am trying to use Butterknife for injection, but I do not see any classes generated in the .apt_generated directory. I am using eclipse Kepler (service release 2), enabled annotat
Solution 1:
First you need to make sure you have an Android project and not an Android library project because Butterknife does not support library projects. To do this click Project Properties
and go to the Android
section. Make sure the is Library
checkbox is not clicked. For further details see:
- https://github.com/JakeWharton/butterknife/issues/2
- http://developer.android.com/tools/projects/projects-eclipse.htm
Then check these settings in project/.factorypath:
<factorypath><factorypathentrykind="WKSPJAR"id="/PotlatchClient/libs/butterknife-5.1.2.jar"enabled="true"runInBatchMode="false"/></factorypath>
project/.settings/org.eclipse.jdt.apt.core.prefs:
eclipse.preferences.version=1org.eclipse.jdt.apt.aptEnabled=trueorg.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.reconcileEnabled=true
project/.settings/org.eclipse.jdt.core.prefs:
eclipse.preferences.version=1org.eclipse.jdt.core.compiler.processAnnotations=enabled
Finally do a refresh in Eclipse and clean to do a full rebuild.
Solution 2:
I suggest to check if you compile and run your app.
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.
Post a Comment for "Butterknife Does Not Create Anything In .apt_generated Directory"