So I just updated my Android Studio to 3.1 from 3.0.1. As I am typing this, over 30 minutes have been passed and Android Studio is stuck at Configure build.
What have I done:
Below is a snapshot of my screen with internet results
These dependencies in particular are taking all the time.
My project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And here is my application build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.smk.carsapp"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
configurations {
all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:exifinterface:27.1.0'
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.wdullaer:materialdatetimepicker:3.5.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.jsibbold:zoomage:1.1.0'
implementation 'com.siclo.ezphotopick:library:1.0.8'
// TEST
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
}
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/siclo/SicloAndroidOSS'
}
}
Fixed:
I changed the distributionUrl
in gradle-wrapper.properties
as pointed by Santanu here.
In gradle-wrapper.properties use this :-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Instead of 4.1-all.zip .