Android Studio构建错误:防火墙阻止Gradle访问Studio [英] android studio build error : firewall blocking gradle access to studio

查看:275
本文介绍了Android Studio构建错误:防火墙阻止Gradle访问Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的防火墙不允许我访问gradle.有没有解决的办法?

My firewall is not letting me access the the gradle . is there a way around this?

失败:构建失败,并出现异常.

FAILURE: Build failed with an exception.

  • 出了什么问题: 配置根项目"MyApplication3"时发生问题.
  • What went wrong: A problem occurred configuring root project 'MyApplication3'.

无法解析配置':classpath'的所有依赖项. 无法解析com.android.tools.build:gradle:1.5.0. 要求者: :MyApplication3:未指定 无法解析com.android.tools.build:gradle:1.5.0. 无法获取资源' https: //jcenter.bintray.com/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom ". 与 https://jcenter.bintray.com 的连接被拒绝

Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:1.5.0. Required by: :MyApplication3:unspecified Could not resolve com.android.tools.build:gradle:1.5.0. Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom'. Connection to https://jcenter.bintray.com refused

这是我的gradle文件

here is my gradle file

apply plugin: 'com.android.application'
final def extension = android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.tataelxsi.snigdha.myapplication"
        minSdkVersion 8
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguardandroid.txt'), 'proguard-rules.pro'
        }
    }
}
extension
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.android.support:support-v4:23.2.1'
    compile 'com.android.support:design:23.2.1'
}

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.3'
}

推荐答案

  1. 转到控制面板
  2. 选择系统和安全性
  3. 您将看到Windows防火墙选项,选择->允许程序通过Windows防火墙

现在取消选中Android Studio,然后单击确定"

Now uncheck the Android Studio and click OK

这篇关于Android Studio构建错误:防火墙阻止Gradle访问Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆