1

I recently added Lombok to my Android project, and I'm getting the following error when using the @RequiredArgsConstructor and @AllArgsConstructor annotations:

error: cannot find symbol
@AllArgsConstructor
^
  symbol:   class ConstructorProperties
  location: package java.beans
1 error

I attempted to follow the solution to this question: AllArgsConstructor from lombok is not found by Android Studio, however, I'm getting the following error:

error: cannot find symbol
@AllArgsConstructor(suppressConstructorProperties = true)
                                                    ^
  symbol:   method suppressConstructorProperties()
  location: @interface AllArgsConstructor
2 errors

I also tried adding a lombok.config file with the line:

lombok.anyConstructor.suppressConstructorProperties = true

But it did't do anything. Is there any work around to this to get Lombok annotations working on Android?

Thomas
  • 1,123
  • 3
  • 13
  • 36

1 Answers1

1

Try switching to an older version of Lombok. I switched back to 1.16.10 (which is still fairly recent), and then remove the suppressConstructorProperties value in your annotation.

Yuri
  • 2,008
  • 17
  • 36