Android Studio 3.3 Stuck at Project Setup:reading

2020-08-20 09:00发布

问题:

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?

回答1:

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



回答2:

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



回答3:

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.



回答4:

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

org.gradle.configureondemand=false

restart your projects