Error:(6, 0) Gradle Dsl Method Not Found: 'Google()'

Error: Gradle DSL method not found: 'google()'

Method google() was added in Gradle 4.0

You should use maven { url 'https://maven.google.com' } on old versions

Also remove repositories section from your app build.gradle (you may merge it with root build.gradle)

Read how to add library to build.gradle here

compile('com.mikepenz:materialdrawer:5.9.5@aar') {
transitive = true
}

Gradle DSL method not found: 'google()'

google() method was only added to RepositoryHandler only in Gradle 4.0. Update your Gradle wrapper to use more recent version:

./gradlew wrapper --gradle-version=4.7 --distribution-type=all

or explicitly set Google's Maven repository, instead of

google()

write

maven { url 'https://maven.google.com' }

Gradle DSL method not found: 'ooapply()'

It looks like a problem in another build.gradle file.
The file you have attached is probably a Project-level build.gradle.

I guess that the problem is inside Module-level build.gradle file. Open this file and replace ooapply with apply.

Gradle DSL method not found: 'implementation()'

To use the DSL implementation() you have to use:

  • The updated gradle plugin for Android 3.0.0
  • The gradle version 3.4 or later

Then in your build.gradle you have to use:

buildscript {
repositories {
...
// You need to add the following repository to download the
// new plugin.
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta1'
}
}

In your gradle-wrapper.properties

distributionUrl=\
https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip

More detailed info here.

Error:(9, 0): 'google()' Gradle DSL method not found

The google() repo requires also gradle v4 and Android Studio 3.x.

Try to use in gradle-wrapper.properties

distributionUrl=\
https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip

In any case you can use the same maven repo using { url 'https://maven.google.com'} (it is the same).

buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
//
}

ERROR: Gradle DSL method not found: 'implementiation()' Possible causes:

It's a typo in your build.gradle. You have used implementiation instead of implementation.

Change this like below:

implementation 'com.google.firebase:firebase-perf:19.0.4'

instead of

implementiation 'com.google.firebase:firebase-perf:19.0.4'

ERROR: Gradle DSL method not found: 'compile()'

Remove this line from the top-level file:

//compile 'io.github.ranga543:yelp-fusion-client:0.1.4'

In the app/build.gradle file you can add the same dependency:

dependencies {
...
implementation 'io.github.ranga543:yelp-fusion-client:0.1.5'
...
}


Related Topics



Leave a reply



Submit