Cannot find Lombok plugin in Android Studio 2021.1.1 (build of 2022)

11.8k views Asked by At

After installation of newest Android Studio I tried to install Lombok plugin
(Android Studio Bumblebee 2021.1.1 | Built on January 19, 2022)

But didn't find Lombok in Settings -> Plugins -> Marketplace

enter image description here

I found that the problem is:
Plugin 'Lombok' is not compatible with Android Studio build AI-211.7628.21

4

There are 4 answers

6
ModX On BEST ANSWER

How to fix it:

6
LXJ On

After downloading the plugin file, version number needs to be changed.

I downloaded lombok-plugin-0.34-2020.2.zip from the releases (https://github.com/mplushnikov/lombok-intellij-plugin/releases), unzip it, went to the META-INF directory, open the jar file, changed in the xml file the line to <idea-version since-build="191.6183" until-build="IE-212.*"/> then saved the zip, installed the plugin from disk on Android Studio. Things seem to work - previous errors regarding unresolved getter functions now gone. Pretty brute force. Not sure if there will be side effects, but who knows if this plugin will only be updated after next year?

Edit: The best solution is to get rid of Lombok from your project. It's very easy in Android Studio from Refactor->Delombok.

2
normidar On

EDIT 2023-07:

Using this "solution"does break code auto completion feature in some cases.
This is probably also true for other 'hackish' solutions listed on this page.

We should wait for lombok plugin to be part of Android Studio.

"The Lombok IntelliJ Plugin should be bundled in Android Studio 2023.1.1.8"
src: https://issuetracker.google.com/issues/266333624


This issue is help for me!!!

https://github.com/mplushnikov/lombok-intellij-plugin/issues/1028

  1. Download latest Lombok Plugin Lombok 0.34.1-2019.1

FYI, all plugin versions are available on JetBrains Marketplace and Github

  1. extract / unzip lombok-plugin-0.34-2020.2.jar from
    lombok-plugin-0.34.1-2019.1.zip/lombok-plugin/lib/lombok-plugin-0.34.1-2019.1.jar

  2. extract plugin.xml from
    lombok-plugin-0.34.1-2019.1.jar\META-INF\plugin.xml
    and change
    <idea-version since-build="191.6183" until-build="191.*">
    to
    <idea-version since-build="191.6183" until-build="999.*">

Why 999? To be future-proof :)

  1. Update / overwrite
    lombok-plugin-0.34.1-2019.1.jar\META-INF\plugin.xml
    with your modified plugin.xml file using this command:
    jar uf lombok-plugin-0.34-2020.2.jar META-INF\plugin.xml
    then

  2. Update / overwrite
    lombok-plugin-0.34.1-2019.1.zip/lombok-plugin/lib/lombok-plugin-0.34.1-2019.1.jar
    with your modified lombok-plugin-0.34.1-2019.1.jar file

  3. In Android Studio, select 'Install Plugin From Disk'
    enter image description here

  4. Select the modified lombok-plugin-0.34.1-2019.1.zip

  5. restart Android Studio

  6. enter image description here

good luck.

0
Gaspar Kuhnen On

To solve Hedgehog problems with version 231.9392.1 you can download de jar and install as a local file.

[Link to jar]https://raw.githubusercontent.com/sgpublic/lombok-plugin-repository/repository/plugins/231.9392.1/lombok-231.9392.1.zip

[source]https://github.com/sgpublic/lombok-plugin-repository?tab=readme-ov-file