Install Failed. Please check your network connection and try again.you may creating your project.

前段时间安卓方面遇到了瓶颈,就搁置了一段时间在忙着其他事情。这两天突然又来了兴致,翻到了一个特别好的源码,但是在导入到我的android studio里面的时候出现了一点问题,可能是版本的问题。

错误详情如下:

这种错误网上解决方法很多,但是可能错误不太一样吧,有的对于我的错误就不太适用。下面我就把我的解决方法粘贴出来供大家参考:

①先把工程调节到android格式:

②展开菜单最下方的Gradle,点击Project的Gradle

③修改里面的代码如下:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
//        google()
        maven { url 'https://maven.google.com/'
            name 'Google'}
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

其中最主要修改:

allprojects {
    repositories {
//        google()
        maven { url 'https://maven.google.com/'
            name 'Google'}
        jcenter()
    }
}

然后重新运行工程就可以了。

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值