1. 程式人生 > >Android Error:Failed to complete Gradle execution. Cause: The version of Gradle you are using (3.3)

Android Error:Failed to complete Gradle execution. Cause: The version of Gradle you are using (3.3)

Android 打包錯誤:
Error:Failed to complete Gradle execution.

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版本是3.3的 這裡不支援,要換成3.5或3.5以後的版本。

我們需要在gradle裡的gradle-wrapper.jar裡改掉我們的gradle版本,如下圖這裡寫圖片描述