Intellij IDEA version to target Android Studio Bumblebee

Answered

Hi,

I have a Android Studio plugin for compatible with Artic Fox (2020.3). It does not work on Bumblebee (2021.1.1) because of a breaking change in the API:

2022-02-18 09:12:11,242 [ 561272]  ERROR - tartup.impl.StartupManagerImpl - 'void com.android.tools.idea.wizard.template.RecipeExecutor.applyPlugin(java.lang.String)' 
java.lang.NoSuchMethodError: 'void com.android.tools.idea.wizard.template.RecipeExecutor.applyPlugin(java.lang.String)'

I would like to make it compatible with Bumblebee.

Thanks to this post https://intellij-support.jetbrains.com/hc/en-us/community/posts/4411503223186 I understand I have to use a Intellij IDEA version with bundles the same version of the Android Plugin that is bundled in Android Studio Bumblebee, so I need to change my Gradle intellij parameters:

intellij {
    version = '213.5744.223'
    type = 'IC'
    plugins = ['android','java']
}

But I don't know where to find this information. Is there an Intellij IDEA version which contains this Android Plugin version of Bumblebee ?

Regards

0
3 comments

Thomas, looking at the About Android Studio card:

we can notice the following:

Build #AI-211.7628.21.2111.8139111

The first three numbers: 211.7628.21, are IJ build version used for AS. This version is exactly what you could use.

0

Hi Jakub, thanks for your quick reply.

I tried with:

intellij {
    version = '211.7628.21'
    type = 'IC'
    plugins = ['android','java']
}

I built my plugin and installed it in Bumblebee, but when I try to create a new project with my template I get the same error than in this post:

java.lang.NoSuchMethodError: 'void com.android.tools.idea.wizard.template.RecipeExecutor$DefaultImpls.save$default(com.android.tools.idea.wizard.template.RecipeExecutor, java.lang.String, java.io.File, boolean, boolean, boolean, int, java.lang.Object)'

I previously used the version 213.5744.223 for the Intellij version, and it worked fine with Android Studio Artic Fox, so it does not seem logical to change the version to a lower value to make it compatible with a more recent version of Android Studio.

As a related question, do you know where I can find a source code of a given version of Android Plugin (or at least the javadoc) and the list of breaking changes between 2 versions?

0

A little update on this issue.

As I said, according to this post, in order to build a plugin for Android Studio, the version of the Android plugin bundled in the Intellij IDEA must match the Android plugin version used in the targeted Android Studio.

Here are the correspondence between Intellij IDEA versions, Intellij Platform versions and Android Studio versions that I found:

| Intellij IDEA | Intellij Platform | Android Plugin |
| 2020.3        | 2020.3              | 10.4.0              |
| 2021.3        | 2021.3              | 2020.3.1.Final |

and the correspondence between Android Studio versions, Intellij Platform versions and Android Plugin versions:

| Android Studio             | Intellij Platform | Android Plugin |
| 2020.3 (Artic Fox)        | 2020.3              | 2020.3.1.Final |
| 2021.1.1 (Bumblebee) | 2021.1              | 2021.1.1          |

So it seems there is no version of Intellij IDEA with the version of the Android Plugin used in Android Studio Bumblebee. Do you confirm ?

The only workaround I found so far is to use the localPath option of the intellij gradle plugin to use a local Android Studio Bumblebee install to build my plugin for Bumblebee:

intellij {
    type = 'IC'
    plugins = ['android','java']
    // Set the localPath to your Android Studio Bumblebee installation
    localPath = 'C:\\Program Files\\Android\\Android Studio'
}
0

Please sign in to leave a comment.