I am using Android Studio 3.1.3. Gradle build sync failed. I used following method but there is no use of it. If there is any solution please tell me
maven { url "https://maven.google.com" }
Invalidate restart & caches
multiDexEnabled
true
Adding
mavenLocal()
andmavenCentral()
This is module level build.gradle file:
android { compileSdkVersion 27 defaultConfig { applicationId "com.developers.a_g.designapp" minSdkVersion 15 targetSdkVersion 27 buildToolsVersion '27.1.1' versionCode 1 versionName "1.0" multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree( dir: 'libs',include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'com.android.support:design-v7:27.1.1' implementation 'com.rengwuxian.materialedittext:library:2.1.4' implementation 'com.szagurskii:patternedtextwatcher:0.5.0' implementation 'com.github.d-max:spots-dialog:0.7@aar' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.squareup.retrofit2:converter-gson:2.3.0' } android { compileSdkVersion 27 defaultConfig { applicationId "com.developers.a_g.designapp" minSdkVersion 15 targetSdkVersion 27 buildToolsVersion '27.1.1' versionCode 1 versionName "1.0" multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree( dir: 'libs',include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'com.android.support:design-v7:27.1.1' implementation 'com.rengwuxian.materialedittext:library:2.1.4' implementation 'com.szagurskii:patternedtextwatcher:0.5.0' implementation 'com.github.d-max:spots-dialog:0.7@aar' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.squareup.retrofit2:converter-gson:2.3.0' }
This is project level build.gradle file:
buildscript {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}