19

I am trying to use plugin com.android.tools.build:gradle:3.0.0-alpha4 in IntelliJ. But I've got the error

Error:This Gradle plugin requires Studio 3.0 minimum

The android gradle plugin version 2.3.3 supports Intellij.

I need IntelliJ due to I want to use AspectJ + Java 8 in IDE. Android Studio IDE doesn't support AspectJ yet, only gradle plugin.

Is it possible to use new version Android Gradle Plugin 3.0.0 with exactly IntelliJ, not Android Studio?

Thank you.

Irina
  • 939
  • 1
  • 8
  • 26

4 Answers4

17

Android Studio 3.0 features will be merged in IntelliJ IDEA 2017.3.x which is not released yet, you can't update just Android plug-in separately, since it's a bundled plug-in and the synchronization with Android Studio is performed manually at JetBrains.

You can track the progress here.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 1
    Thank you. I think you mean IDEA 2017.**3**. IDEA 2017.2 is [avaible](http://blog.jetbrains.com/idea/2017/05/intellij-idea-2017-2-eap-is-here/). I am using it) – Irina Jun 28 '17 at 14:15
  • It's a pre-release, official release is not available yet. AS 3.0 features may be merged later in 2017.2.x updates. – CrazyCoder Jun 28 '17 at 14:16
  • 1
    @Halil sorry, it was postponed to 2017.3.x version, you can [track the progress here](https://youtrack.jetbrains.com/issue/IDEA-181202). – CrazyCoder Nov 06 '17 at 20:19
  • 2
    2017.3 is out but I still see this warning! – Eugen Martynov Nov 29 '17 at 15:39
  • @EugenMartynov please follow https://youtrack.jetbrains.com/v2/issue/IDEA-181202 for updates. – CrazyCoder Nov 29 '17 at 17:07
  • Looks like they postponed it to 2018.1 again, although they want to backport it to 2017.3.x once 2018.1 was released – msrd0 Dec 09 '17 at 22:58
12

As workaround you can add in gradle.properties this option: android.injected.build.model.only.versioned=3

Full answer: https://stackoverflow.com/a/46634836/4050911

osipxd
  • 1,218
  • 16
  • 23
  • Thanks for this. Note that this will get the Gradle sync working in IntelliJ but you'll probably run into issues when trying to deploy your Android app onto a device or emulator from within IntelliJ. – Adil Hussain Nov 21 '17 at 17:59
1

As the error states, you'll have to download Android Studio 3.0 (Canary) in order to use gradle plugin 3.0.0.

CoderP
  • 1,361
  • 1
  • 13
  • 19
0

You need update your gradle version of both file Module level and Project Level as per the error '3.0.0' and then try to build the project

pawan kasar
  • 170
  • 1
  • 6
  • When it gradle version was lower(3.3), the error was another: Gradle demanded new gradle verstion for using this plugin. – Irina Jun 28 '17 at 12:02
  • @irina Then please try to update Android Studio I think it will solve your problem – pawan kasar Jun 28 '17 at 12:08
  • As far as version Android 3.0. is **alfa** (not even beta), version android gradle plugin is **alfa** too(3.0.0-alfa4), and [maven reposotry](http://mvnrepository.com/artifact/com.android.tools.build/gradle) even doesn't show the new version, I think that the new android gradle plugin doesn't supported by Idea yet. – Irina Jun 28 '17 at 12:09
  • @Irina follow this link https://android-developers.googleblog.com/2017/05/android-studio-3-0-canary1.html Android 3.0 currently Alfa not stable thats why it is giving you error – pawan kasar Jun 28 '17 at 12:15
  • I am using IntelliJ with android plugin:) Not Android Studio. Android Studio works fine, but doesn't support AspectJ. – Irina Jun 28 '17 at 12:16