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

4

21

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

Sumter answered 28/1, 2022 at 22:24 Comment(2)
you could check this answer out to see if it helps!Philippi
"The Lombok IntelliJ Plugin should be bundled in Android Studio 2023.1.1.8." see issuetracker.google.com/issues/266333624 and github.com/JetBrains/intellij-community/tree/master/plugins/… Do NOT try to 'side-load' the current Lombok plugin: this breaks auto-completion in Android Studio (in some cases)Peirce
S
42

How to fix it:

Sumter answered 28/1, 2022 at 22:24 Comment(6)
This worked for me on macOS 11.6.4, AS Bumblebee Build #AI-211.7628.21.2111.8193401Bifocals
Worked!! Without any other fixing or editing!Deanedeaner
i also use android studio version same as you but i follow above it doesnt work can you help me @DiegoTorresMilanoGardel
Didn't work on my machine, at least on version 2021.1.1 Patch 1 (from Feb 1 2022) (Linux) - i.sstatic.net/qGFak.png -> but the other solution with editing the plugin jar helpedTow
Extracting to ~/android-studio/plugins folder helped me. Android Studio Bumblebee | 2021.1.1 Patch 3. Editing jar file didn't help me.Quadrature
Worked for me. Android Studio Electric Eel | 2022.1.1 Patch 2Cleaver
C
13

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.

Cephalization answered 7/2, 2022 at 20:51 Comment(6)
This should be marked as the solution. Should work for everyone, including flatpak users. Thank you for suggesting this.Lean
Very nice solution, you saved my time dude.Maible
Thanks. The instructions are now available in this video youtu.be/A14hrtUeNWUBondie
none of this (or other threads "solutions") worked for me, I spent 2 hours trying everything humanly possible...I am getting rid of lombok from my projects...RIP :( Googlers once again killed a good idea. I'm starting to hate that company...Cisterna
Delombok doesn't show in the refactor section.Tennilletennis
until-build="999.*" -> Future-proof ;-)Peirce
C
3

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.

Crinkleroot answered 15/12, 2022 at 5:56 Comment(2)
now you should change 202.* to AI-221.6008.13Crinkleroot
now I use IntelliJ IDEA CE to develop Android applicationCrinkleroot
D
1

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

Distillate answered 13/12, 2023 at 19:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.