Mahabub Karim
Mahabub Karim

Reputation: 870

Failed to update the android gradle plugin 3.5.0

buildscript {
repositories {
    jcenter()
    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.5.0'
    //classpath 'com.android.tools.build:gradle:3.2.0-alpha09'
    classpath 'com.google.gms:google-services:4.3.2'
    classpath 'com.google.firebase:firebase-plugins:2.0.0'
    /*classpath 'com.google.gms:google-services:3.2.1'
    classpath 'com.google.firebase:firebase-plugins:1.2.0'*/
    classpath 'com.google.guava:guava:24.1-jre'
  }
}

allprojects {
repositories {
    jcenter()
    mavenCentral()
    flatDir {
        dirs '../libs'
    }
    google()
    maven { url "https://jitpack.io" }
}
tasks.withType(JavaCompile) {
    options.incremental = true
 }
}

ERROR: Gradle DSL method not found: '19.0.0()' Possible causes: The project 'Rightrend-20190527-2051' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 3.5.0 and sync project

The project 'Rightrend-20190527-2051' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file

The build file may be missing a Gradle plugin. Apply Gradle pluginenter image description here

Upvotes: 5

Views: 5424

Answers (4)

Anderson
Anderson

Reputation: 1

In "classpath" alter for "implementation" (update your dependencies):

dependencies {
    implementation'com.android.tools.build:gradle:3.5.0'
    //implementation'com.android.tools.build:gradle:3.2.0-alpha09'
    implementation'com.google.gms:google-services:4.3.2'
    implementation'com.google.firebase:firebase-plugins:2.0.0'
    /*implementation'com.google.gms:google-services:3.2.1'
    implementation'com.google.firebase:firebase-plugins:1.2.0'*/
    implementation'com.google.guava:guava:24.1-jre'
  }

Upvotes: -1

Martin Zeitler
Martin Zeitler

Reputation: 76849

This is the wrongful line, because Guava is not a Gradle plugin:

classpath 'com.google.guava:guava:24.1-jre'

Upvotes: 0

Radesh
Radesh

Reputation: 13585

I fix this error by adding this line to .gradle file (app)

Gradle DSL method not found: 'kapt()' Possible causes: The project 'Isfahan Metro' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 3.5.3 and sync project

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' // add this

for your problem check this link.

https://stackoverflow.com/answer

move google() above.

Upvotes: 3

Harsh Jatinder
Harsh Jatinder

Reputation: 873

Open your gradle-wrapper.properties file, and update distributionUrl to https://services.gradle.org/distributions/gradle-5.4.1-all.zip

Upvotes: 0

Related Questions