Android的java的报错提示:

......
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
    project :
Add google Maven repository and sync project
Open File

在这里插入图片描述
错误在哪,可以发现:
这报错信息中的Add google Maven repository and sync project,看来可能Project的build.gradle少了“google()

解决:

点击,按下图操作:
在这里插入图片描述
在这里插入图片描述
自动添加“google()”,如下图:
在这里插入图片描述

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐