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: 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'
How can I solve this error? ( ERROR: Gradle DSL method not found: 'implementation()')
You are adding the dependencies to the incorrect gradle file.
All the project dependencies (here implementation 'com.android.support:design:28.0.0'
) should go into your app's build.gradle
file.
Look at your project structure closely, there must be 2 build.gradle files there, add this dependency to the other gradle file.
Gradle DSL method not found: 'androidTestImplementation()'
You are using the wrong build.gradle
file and the wrong block.
You have to move the androidTestImplementation
from the top-level file to the module/build.gradle
file in the dependencies
block (not the dependencies
in the buildscript
block)::
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
//...
}
dependencies {
//...
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
}
Related Topics
Arrayindexoutofboundsexception with Custom Android Adapter for Multiple Views in Listview
When Do I Use Setstate in Flutter
How to Access Files Under Assets Folder of Other APK'S
How Many Activities Vs Fragments
Why Bitmap to Base64 String Showing Black Background on Webview in Android
In Android Applications What Is The Role of "R.Java"
Searchview in Centre and After Focus It Goes to App Bar in Android
Intercept and Override Http Requests from Webview
How to Access Adb in Os X Through Terminal, "Command Not Found"
Automatic Versioning of Android Build Using Git Describe with Gradle
Android: Save File Permanently (Even After Clear Data/Uninstall)
How to Add Padding Between Menu Items in Android
Shared Preferences Reset Data When App Is Force Closed or Device Is Restarted
Error Inflating Class Com.Google.Android.Maps.Mapview
How to Implement Search in Customlistview Based on Class Item of Pojo Class in Android