Android Studio 3.3 Stuck at Project Setup:reading from cache
Asked Answered
S

4

10

I have create module library with NDK. After updating Android Studio 3.3, open project on studio stuck on build project

Project Setup:reading from cache...

Every time needs to "Invalidate and Restart" android studio then after studio working.

I have try to delete .gradle folder but still facing this issue.

How can I solved this misbehavior of studio 3.3?

Schilt answered 8/2, 2019 at 5:16 Comment(2)
try clean project , If not helps try deleting .idea/caches , build , .gradle and rebuild againFigured
I have the same issue with NDK. Can't compile. argggBaldridge
P
13

I don't have enough reputation to comment so I'll post this as an answer.

  • After you Invalidate and Restart have you tried Build->Clean Project and rebuilding then syncing again?

  • Have you tried restarting your computer to turn of any processes that may keep caches from clearing?

  • Have you tried upgrading your gradle version as well (inside your gradle-wrapper.properties)?

  • Have you checked if your gradle path is correct at File -> Settings -> Build, Execution, Deployment -> Gradle?

  • Have you tried locating your gradlew and doing a gradlew cleanBuildCache?

  • Have you tried removing the C:\Users\{Your Username}\.gradle\caches folder?

  • Have you tried disabling cache building altogether (will slow down your build and is not recommended)? To do this you have to go to your gradle.properties file and set android.enableBuildCache=false

Pharisaic answered 8/2, 2019 at 5:48 Comment(5)
Already used latest gradle version and also try "gradlew cleanBuildCache" but still not issue resolved. @PharisaicSchilt
I have updated my answer. Try disabling build cache altogether and see if it works. Also have you even restarted your PC? @JigarShekhPharisaic
Try this "android.enableBuildCache=false" and close android studio. After reopen studio on getting warning:: "WARNING: The option setting 'android.enableBuildCache=false' is experimental and unsupported. The current default is 'true'. Affected Modules: app, commonlib" @PharisaicSchilt
Yes, this is not recommended, just wanted to see if it worked. Anyway, after you invalidate and restart did you do a Build -> Clean Project Then rebuilt it and synced it? However, I would just say restart your computer so any processes turn off and cache can clear without a problem when you start android studio again.Pharisaic
What finally worked for me was file->invalidate caches/restart. See:#52513597Mccool
V
1

Gradle caches are at

  • On macOS/Linux: $HOME/.gradle/caches/
  • On Windows: %USER_HOME%\.gradle/caches/

Try to delete those directories.

More about build caches is here: Android Studio Build Cache

Also, Disable configuration on demand in your gradle.properties file as shown below:

org.gradle.configureondemand=false

See: Known issues with the Android Gradle Plugin

Vary answered 8/2, 2019 at 5:27 Comment(2)
I have deleted "%USER_HOME%\.gradle" directory and reopen android studio but unfortunately not resolved my issue. @VarySchilt
Probably it is a daemon issue, try to stop your daemon using ./gradlew --stopVary
L
0

Try Below approach:

Go to "

File -> Settings -> Build, Execution, Deployment -> Instant Run"

and just disable it.

With this Android Studio builds from scratch each time but it's better than not building it right.

Lapointe answered 8/2, 2019 at 5:23 Comment(1)
Already disable it. But still facing this issue. @Chetan JoshiSchilt
V
0

open your project's gradle.perperties file and add settings:

org.gradle.configureondemand=false

restart your projects

Vexation answered 17/4, 2019 at 9:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.