Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 未找到Gradle DSL方法:';ooapply()';_Java_Android_Gradle - Fatal编程技术网

Java 未找到Gradle DSL方法:';ooapply()';

Java 未找到Gradle DSL方法:';ooapply()';,java,android,gradle,Java,Android,Gradle,我在尝试解决链接[StackOverflow link]()后出现的google()错误后收到此错误 gradle-wrapper.properties的代码 #Mon Jun 19 10:50:31 IST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=ht

我在尝试解决链接[StackOverflow link]()后出现的google()错误后收到此错误

gradle-wrapper.properties的代码

#Mon Jun 19 10:50:31 IST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
我的Android studio版本是3.3.2

下面是出现的完整错误。很少的帮助是非常有用的

Gradle DSL method not found: 'ooapply()'
Possible causes:
The project 'MyProject' 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.3.2 and sync project

The project 'MyProject' 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

我无法继续…

另一个build.gradle文件中似乎出现了问题。 您附加的文件可能是项目级别的build.gradle


我猜问题出在模块级的build.gradle文件中。打开此文件并将ooapply替换为apply

谢谢,同时我尝试使用谷歌提供的最新gradle文件进行构建。并为Git项目升级到Android Studio 3.5。
Gradle DSL method not found: 'ooapply()'
Possible causes:
The project 'MyProject' 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.3.2 and sync project

The project 'MyProject' 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