Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 1.5 Gradle Sync never completes

I recently upgraded to Android Studio 1.5. However, after update, Gradle gets stuck at "Refreshing [project] Gradle Project" and never stops.

Previous version of Android Studio worked just fine.

How do I solve this?

I am on an Ubuntu 15.10 64bit machine.

Edit:
So far, I have tried deleting Android Studio from /opt and downloading the latest version. Didnt help.

I also tried removing the ~/.AndroidStudio1.5 directory. To no avail.

This is in my "Event Log"

Gradle sync started
NullPointerException: null

like image 753
An SO User Avatar asked Feb 08 '23 12:02

An SO User


1 Answers

In your Android Project change gradle-wrapper.properties file, which is in *project/gradle/wrapper:

From:

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

To:

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

And also change the project build.gradle like below:

 dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
}
like image 150
Ehsan Mehranvari Avatar answered Feb 11 '23 14:02

Ehsan Mehranvari