Gradle打包问题Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0

时间:2024-03-30 20:09:14

原因

说明本地环境的gradle版本太高,不支持之前的语法和特性,所以导致报错。所以我们需要修改本地的gradle版本。

解决步骤

操作环境:IDEA

1:打开gradle-wrapper.properties

项目---gradle目录---wrapper目录---gradle-wrapper.properties文件

Gradle打包问题Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0

2:修改gradle版本

找到distributionUrl 属性,修改版本号。和build.gradle中依赖的gradle支持之前语法特性的版本都可以。

Gradle打包问题Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0

3:重新build

点击build的刷新按钮,重新build

Gradle打包问题Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0