Add Google Maven repository and sync project


用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()
    }
}

 


当然报这个错有可能修改这里还没有好,但是哥这次修改这样就好了,哈哈
————————————————
版权声明:本文为CSDN博主「无风之翼」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/peachs885090/article/details/103048555


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM