-2

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

FAILURE: Build failed with an exception.

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'
}
summer93
  • 11
  • 1
  • 9

2 Answers2

0

You just open your root gradle file and then set your class path in dependencies block like this but be sure that class path set in your project gradle file not in your modual gradle file i hope this will help you

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

    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Farmer
  • 4,093
  • 3
  • 23
  • 47
  • my firewall is blocking the url. cannot use this method. i have downloaded the gradle 1.5.0 . how do i add it manually?? – summer93 Apr 14 '16 at 10:09
  • i don't know more about but you just go to C:/User/.../ .gradle / wrapper /dists folder and paste it your folder and then clean your project and set your path or else follow this line http://stackoverflow.com/questions/16682847/how-to-manually-include-external-aar-package-using-new-gradle-android-build-syst – Farmer Apr 14 '16 at 10:58
0
  1. Go to Control Panel
  2. Choose System and Security
  3. You will see Windows Firewall option choose -> Allow a Program through Windows Firewall

image here

Now uncheck the Android Studio and click OK

Pranav Karnik
  • 3,318
  • 3
  • 35
  • 47
bharat udasi
  • 133
  • 7