I have recently updated android studio to the latest version,but then comes the problem.
Gradle 'MyApplication' project refresh failed. Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip'.
Found this in StackOverflow
However trying everything nothing works - cannot create new project of import anything at the moment.Please kindly advice.
apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.sclick.myapplication" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } task assemble{} buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.3' } **Top Level Gradle.build**
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }
gradle-wrapper.properties
#Wed Apr 10 15:27:10 PDT 2013 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
I had same issue. I have tried many things but nothing worked Until I try following:
gradle-[version]-all
within C:\Users\<username>\.gradle\wrapper\dists\
. If you encounter a "File in use" error (or similar), terminate any running Java executables..gradle
directory.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With