'Gradle build is stuck and never finishes after updating to Android Studio 3.2
I have a project in android and after updating to android studio 3.2 Gradle build is stuck and never finishes. I looked at the task manager and the Open JDK Platform Binary task is going to suspended a few seconds after i start the build. Anyone has seen something similar?
- I have distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip
- Deleted the .gradle folder and tried again
- My build tools version is buildToolsVersion '26.0.2' and version of gradle is 'com.android.tools.build:gradle:3.2.0
- Changed compile to implementation
I have no idea why the task is suspended but that is why the build gets stuck when i try from the terminal a Java Platform Binary task is generated and this is not suspended. Any help would be appreciated.
Solution 1:[1]
I managed to solve it by changing the SDK location (File->Project Structure->SDK location) and point to a different path on the JDK location, i had another version of JDK so using that it doesn't suspend the task of Open JDK Platform Binary. At least this change allows me to sync and build the project.
Solution 2:[2]
I had the same issue and I solved it by downgrading Android Studio to 3.1.4 version. You can download it from here: https://developer.android.com/studio/archive
You can keep both versions, and you can use the same Android SDK Folder. However, I reccommend you to select "Do not import settings" option on the installation process. Regards.
Solution 3:[3]
Deleting both the "/build/ and "/app/build/" folders solved my problem!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | cousma |
| Solution 2 | Acentellao17 |
| Solution 3 | Mahdi Parastesh |
