I\'m using Android Studio 2.2 Preview 7, and the Lombok plugin suddenly started saying:
Annotation processing seems to be disabled for the project X
, and provid
Follow what setup manual says:
Gradle Make sure that the version of your android plugin is >= 0.4.3 Use the gradle-lombok plugin. If you don't want to use the plugin, add Lombok to your application's dependencies block (requires Gradle v2.12 or newer):
dependencies { compileOnly "org.projectlombok:lombok:1.16.18" }
Android Studio Follow the previous instructions (Gradle). In addition to setting up your gradle project correctly, you need to add the Lombok IntelliJ plugin to add lombok support to Android Studio:
- Go to File > Settings > Plugins
- Click on Browse repositories...
- Search for Lombok Plugin
- Click on Install plugin Restart Android Studio
https://projectlombok.org/setup/android
With the newer gradle versions, it is enough to type these lines into the app's build.gradle's dependencies block:`
compile "org.projectlombok:lombok:1.16.16"
annotationProcessor "org.projectlombok:lombok:1.16.16"
Sync the project with the gradle and it will work.
add dependencies : https://projectlombok.org/setup/gradle
compileOnly 'org.projectlombok:lombok:1.18.12' annotationProcessor 'org.projectlombok:lombok:1.18.12'
testCompileOnly 'org.projectlombok:lombok:1.18.12' testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
this is worked for me.
The setup guide from the lombok website(lombok set up for android) says we should do two things
1, install the lombok plugin
2, add gradle dependencies
dependencies { compileOnly 'org.projectlombok:lombok:1.18.6' annotationProcessor 'org.projectlombok:lombok:1.18.6' }
But for me the plugin causes the problem to occur. After I disabled the plugin the error went away and lombok still works.
Probably marked answer was sufficient at the time but I struggled a bit with android studio 3 and lombok 1.16.18. Anyway following worked for me
in app
> build.gradle
add following
compileOnly 'org.projectlombok:lombok:1.16.18'
annotationProcessor 'org.projectlombok:lombok:1.16.18'
you may start getting other errors so if you in your MyApplication
> lombok.config
add following lines
lombok.addGeneratedAnnotation = false
lombok.anyConstructor.suppressConstructorProperties = true
if you don't have lombok.config
just added it
Above were suggested by the developer of lombok in following posts
addGeneratedAnnotation
suppressConstructorProperties
In AndroidStudio 3.5+ do next steps:
File -> Other Settings -> Preferences for New Projects... (!)
Build, Execution, Deployment
Compiler
Annotation Processors
Enable annotation processing
If it still wouldn't work just reinstall Lombok plugin.