Deprecated Gradle features were used in this build, making it incompatible with Gradle

在运行react-native项目的时候,突然报了一个这个错误,

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.Use ‘–warning-mode all’ to show the individual deprecation warnings

意思就是Gradle版本不匹配

下面我的版本   

我的解决方法:

在这个网站上看Gradle的版本: https://services.gradle.org/distributions/

我试了一下其他的版本:

首先是 gradle-5.4.1-all, 这个版本还是报错,6.0不兼容, 然后试了gradle-6.1-all,这个报了一个7.0不兼容,接着又试了几个5.x的版本,最后发现gradle-5.6.4-all对于我的项目是兼容的

在这里修改一下版本号

然后cd .\android\ 接着执行 .\gradlew就会下载你修改之后的版本了,下载成功的文件会放在android/.gradle文件里面

上午还能正常运行的,下午我的就不行了,我现在也不知道为啥会出现这个问题的,不知道怎么确认跟项目兼容的Gradle版本,哪位兄台知道的话,可以指点一下

猜你喜欢

转载自blog.csdn.net/jiayang_Sir/article/details/105515741