Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio 3.2 preview gradle sync failed but build success

Build/Sync window showed the 'CONFIGURE SUCCESSFUL' and Build Successful. But the android studio still show the error: "Gradle project sync failed. Basic functionality will not work properly"

like image 592
Leon Lei Avatar asked May 11 '18 05:05

Leon Lei


People also ask

Why is my Gradle sync failing?

Using the Proxy Servers: There was an issue with the syncing of the Gradle when Proxy Servers were turned on. Disabling it can help. Cache Memory: Android Studio uses Cache memory for fast and smooth usage of the app. Sometimes the cache gets corrupted due to which Gradle sync fails.


2 Answers

Update at 2019/01/15

Update android studio to 3.3 fix this problem!


I face this too. Not a solve, but you can try.

  1. In your project gradle file

change gradle version from 3.2.0 to 3.1.4

com.android.tools.build:gradle:3.1.4

  1. In gradle-wrapper.properties file

change gradle version from 4.6 to 4.4

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

like image 144
aotian16 Avatar answered Nov 05 '22 11:11

aotian16


My problem was there was no google() in my repo list under all projects:

allprojects {
    repositories {
        jcenter()
        google()
    }
}
like image 1
Uriel Frankel Avatar answered Nov 05 '22 11:11

Uriel Frankel