5
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

Mahabub Karim
  • 810
  • 11
  • 17

4 Answers4

3

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.

Radesh
  • 13,084
  • 4
  • 51
  • 64
0

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

Harsh Jatinder
  • 833
  • 9
  • 15
0

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

classpath 'com.google.guava:guava:24.1-jre'
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
-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'
  }
Nikos Hidalgo
  • 3,666
  • 9
  • 25
  • 39
  • 1
    Hi @Andersan and welcome on Stackoverflow! Can you elaborate more on your answer? At first view, I can't find the difference with the code block from the question. Thanks – jmaitrehenry May 19 '20 at 17:31