When I create a new Java class with one or more field and attach the @AllArgsConstructor annotation from lombok to it, then i get this message
Err
You need to add suppression in your AllArgsConstructors. If you don't want to add a new config file, you can simply do this:
@AllArgsConstructor(suppressConstructorProperties = true)
Disclosure: I'm not a Lombok developer :D
Also:
If you target Java 8 in your Android project (e.g. by using retrolambda) this error will not appear.
Annotation suppressConstructorProperties is now not supported by Lombok. If you try to remove (suppressConstructorProperties = true), you would be getting the following error:
Error:(9, 1) error: cannot find symbol class ConstructorProperties
Below are the steps to solve this problem: 1. Remove (suppressConstructorProperties = true) from the object. 2. Go to project level dir. in your app and create a lombok.config file. 3. Paste below code in the config file.
config.stopBubbling = true
lombok.addGeneratedAnnotation = false
lombok.accessors.chain = false
lombok.anyConstructor.suppressConstructorProperties = true
Lombok generates the @ConstructorProperties by default for all generated constructors. On Android, that annotation is not available. As mentioned in the documentation it is possible to suppress the generation by either specifying suppressConstructorProperties=true for each @XxxArgsConstructor, or by using the following line in a high level lombok.config file:
lombok.anyConstructor.suppressConstructorProperties = true
Disclosure: I am a Lombok developer
I had the same problem after updating Android Studio.
None of the another answers including accepted one helped me.
Finally I have updated the lombok version to 1.16.20 (the latest for today) and the error disappeared.
Hope it will save time for someone.
@AllArgsConstructor(suppressConstructorProperties = true) solution is not working anymore. If you try this, you get the following:
This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'.
The working solution is adding lombok.anyConstructor.suppressConstructorProperties = true to lombok.config file.