1

This is, unfortunately, not a duplicate of Error:(1, 0) Plugin with id 'com.android.application' not found - solutions from there don't help me.

The problem occurred today after updating Android Studio when it said I should update Gradle to 2.14. I clicked "OK" and now my project is somehow broken. The error I get is in the title.

This is my root build.gradle:

    buildscript {
        repositories {
           jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.3'
        }
    }

    allprojects {
        repositories {
            jcenter()


 }
}

And this is the first line in the project build.gradle:

apply plugin: 'com.android.model.application'

If I change it to

apply plugin: 'com.android.application'

I get an error

Error:Cause: buildToolsVersion is not specified.
Community
  • 1
  • 1
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
  • 1
    Post both your project and module `build.gradle` files – Shaishav Aug 16 '16 at 08:01
  • @Shaishav: The project-level one is already posted in my question in its entirety. Here's the module build file: https://gist.github.com/VioletGiraffe/826ba80b7e7d800c20aa067fa9506c11 – Violet Giraffe Aug 16 '16 at 08:04
  • Not aware of the requirements in the latest gradle version but, the docs say use `classpath "com.android.tools.build:gradle-experimental:0.7.0-alpha4"` in project build.gradle file – Shaishav Aug 16 '16 at 08:19
  • @Shaishav: that almost looked as if it was going to work, but... "Error:Could not find com.android.tools.b‌​uild:gradle-experimen‌​tal:0.7.0-alpha4." – Violet Giraffe Aug 16 '16 at 08:20
  • I took it from here: http://tools.android.com/tech-docs/new-build-system/gradle-experimental ... it synced properly in mine. – Shaishav Aug 16 '16 at 08:22
  • @Shaishav: note that they also list `distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip`. Problems started when Android Studio updated it to 2.14 today. So basically, no one knows which version name to put in the `classpath` now? – Violet Giraffe Aug 16 '16 at 08:23
  • oh...sorry...totally new plugin for me :/ – Shaishav Aug 16 '16 at 08:23
  • @Shaishav: There's also this, but I don't know what to make of it either: https://developer.android.com/studio/releases/gradle-plugin.html – Violet Giraffe Aug 16 '16 at 08:26

1 Answers1

1

This was an NDK project which means I couldn't use classpath 'com.android.tools.build:gradle:2.1.3'. I needed classpath "com.android.tools.build:gradle-experimental:0.7.3". Updating from 0.7.0 to 0.7.3 solved all my problems that were caused by updating Gradle to 2.14.

Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335