Android Studio: Gradle version 2.1 is required. Current version is 2.2.1

After updating Android Studio to 1.0.1, and successfully converting another pre-1.0 project to 1.0, I had an annoying build problem today with another project of me.

Android Studio / Gradle kept complaining „Gradle version 2.1 is required. Current version is 2.2.1“ after I did the required changes to the project files. But that message was very misleading. When I changed from 2.2.1 to 2.1 all that happened was that other errors occurred, but still no successful build.

Later I found the reason: In the module settings for my project, on „Project“, the wrong „Android Plugin Version“ was set. It should have been, and is now, „1.0.0“ but instead it was still set to „0.13.1“ or something like that (I’m writing this hours later, don’t remember exactly). After changing that option gradle build the project like expected.

What lead me there was this note in „gradle.properties“:

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.“

I’ve double-checked every dialog related to build settings after reading this, which made me find that option…

If you ask me, Google must really fix this stuff – if they don’t manage to auto-upgrade projects they should at least give useful error messages. It took me hours to sort this out because of that misleading error message. But I think Android Studio should just auto-upgrade older project definitions to prevent such shit from happening at all. Also the config files should always overwrite IDE settings imho. But well, that’s a topic you can argument over for hours, too.

Gelesen: 15506 · Heute: 3 · Zuletzt: 22. November 2024

Das könnte dich auch interessieren …

Kommentar verfassen

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.