Cause:
The version of Gradle you are using (3.3) does not support the forTasks() method on BuildActionExecuter. Support for this is available in Gradle 3.5 and all later versions.
解决办法如下
找到gradle下面的gradle-wrapper.properties
然后把这个注释
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
在换上下面这个:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
然后点击Sync Now,然后就ok了。
本文解决了一个关于Gradle版本不支持forTasks()方法的问题。通过更新gradle-wrapper.properties文件中的Gradle版本从3.3到4.1,解决了该方法不被支持的问题。

1882

被折叠的 条评论
为什么被折叠?



