zl程序教程

您现在的位置是:首页 >  后端

当前栏目

【错误记录】jcenter 移除问题 ( Please remove usages of `jcenter()` Maven repository from your build scripts )

Maven错误 问题 记录 of from your 移除
2023-06-13 09:18:01 时间

文章目录

一、报错信息


报错信息 :

Please remove usages of `jcenter()` Maven repository from your build scripts and migrate 
your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
Currently detected usages in: root project 'Application', project ':app'
Affected Modules: app

机翻仅做参考 :

请从构建脚本中删除“jcenter()”Maven repository的用法,
并将构建迁移到其他 Maven repository。
此存储库已弃用,将在将来关闭。
看见
http://developer.android.com/r/tools/jcenter-end-of-service
了解更多信息。
当前在以下项目中检测到用法:根项目“Zapp”,项目:应用程序
受影响模块:应用程序

二、解决方案


上述报错只是进行提示 , jcenter 马上要停止维护并关闭 ,

目前只能使用

    repositories {
        google()
        mavenCentral()
    }

这两个 Maven 仓库 ;

将 build.gradle 中的 jcenter() 注释掉 , 上述报错消失 ;

移除 jcenter 会造成相关依赖库无法下载 , 可能需要手动添加依赖 ;