首页 > 编程知识 正文

Add Google Maven repository and sync project

时间:2023-05-05 21:18:06 阅读:281275 作者:211

用Android studio导入一个项目时,可以会报
Add Google Maven repository and sync project
有可能的解决方法如下:
在项目的build.gradle中修改如下:

buildscript { repositories { maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} //jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { google() maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} //jcenter() }}

当然报这个错有可能修改这里还没有好,但是哥这次修改这样就好了,哈哈

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。