Android Studio: "Project setup: reading from cache" stall on Ubuntu 18.10

1

Every time I reopen a project on Android Studio, the gradle configuration automatically tries syncing to the project, which is perfectly normal. However, the sync never completes and is stuck at "Project Setup: reading from cache".

My best guess is that the project cache is not properly being saved when closing a project, preventing any future access. Using File > Invalidate Caches / Restart > "Invalidate and Restart" does work, but this has be done everytime and for some of my larger projects, takes forever to index and sync.

How do I go about fixing this?

Mks

Posted 2019-02-01T02:30:50.810

Reputation: 13

Answers

2

According to Android Studio's Known Issues https://developer.android.com/studio/known-issues under "Configuration on demand with Gradle 4.6 and above:", if you are using Android Gradle Plugin 3.0.x or 3.1.x with Gradle 4.6 and above you should add the following line to gradle.properties:

org.gradle.configureondemand = false

This seemed to solve my issue with Android Studio getting stuck at "Project setup: reading from cache".

Jeremiah Eikenberg

Posted 2019-02-01T02:30:50.810

Reputation: 36

0

I had the same problem when I moved the project in another folder. The fix for me was to delete the gradle cache from C:/Users//.gradle/cache (in Windows - in Ubuntu I don't know where the cache location is) and in Android Studio -> File- Invalidate caches/restart -> invalidate and restart.

Mihai Coman

Posted 2019-02-01T02:30:50.810

Reputation: 1