Android Studio突然停止工作。Studio asks me to upgrade my build。gradle版本升级到3.4.1。我已经这样做了,但它仍然给出了问题;
ERROR: Gradle DSL method not found: 'testImplementation()'
..。
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
..。
ERROR: Gradle DSL method not found: 'testImplementation()'
Possible causes:
The project 'android' 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.4.1 and sync project
The project 'android' 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 plugin
发布于 2019-06-17 17:51:55
这是由您的Windows语言设置引起的。您发送的代码来自build.gradle(Project:)
文件。相反,打开build.gradle (Module:app)
文件,然后将dependencies
下的所有testImplementation
更改为testİmplementation
(大写为İ)。清理并构建。
发布于 2019-06-22 07:26:29
我已经一个月不能使用演播室了。这就是对我有效的解决方案;当我将gradle版本更新到最新版本时,它不起作用。转到路径\flutter\packages\flutter_tools\gradle\flutter.gradle,即使工作室想要更新,也不要更改gradle (...build:gradle:3.2.1)的版本。
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
https://stackoverflow.com/questions/56617900
复制相似问题