iis服务器助手广告广告
返回顶部
首页 > 资讯 > 移动开发 >Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. 解决办法
  • 649
分享到

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. 解决办法

gradleandroid 2023-09-09 18:09:37 649人浏览 独家记忆
摘要

今天编译一个之前在家里打包的项目 然后发现公司的电脑编译不过 问题如下 Deprecated Gradle features were used in this build, making it incompatible with Gr

今天编译一个之前在家里打包的项目 然后发现公司的电脑编译不过 问题如下

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

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

 发现是Gradle版本的问题 导致出现的这个问题

根据上面的提示在Terminal里面输入如下指令 

gradlew --warning-mode all

编译后有如下提示

> Configure project :The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in February 2021. Use MavenCentral() instead. Consult the upgrading guide for further infORMation: Https://docs.gradle.org/7.2/userguide/upgrading_version_6.html#jcenter_deprecation        at build_al187h50hbdustpaoood7j9ji$_run_closure1$_closure3$_closure5.doCall(G:\AndroidStudioProject\noaar\mjTest\mj\build.gradle:8)        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

说的很明白 jcenter()这个函数已经被弃用替换为mavenCentral()函数即可

找到build.gradle文件 原本是

allprojects {    buildscript {        repositories {            jcenter()            Google()        }        dependencies {            classpath 'com.android.tools.build:gradle:7.0.4'        }    }    repositories {        jcenter()        google()    }...}

修改为如下就行了

allprojects {    buildscript {        repositories {            mavenCentral()            google()        }        dependencies {            classpath 'com.android.tools.build:gradle:7.0.4'        }    }    repositories {        mavenCentral()        google()    }...}

再次编译发现过了

来源地址:https://blog.csdn.net/qq_41973169/article/details/129079641

--结束END--

本文标题: Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. 解决办法

本文链接: https://www.lsjlt.com/news/401792.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作