skip to Main Content

currently i’m reading courses and each unit/lesson needs me to clone a repo
but importing indexing and the whole gradle thing takes 5 to 10 minutes , not a disk problem i’m using a ssd , not a network problem either

tried downloading all gradle jdks azul-23.0.1 , corretto-23.0.1 , graalvm-ce-23.0.1 ,….

tried turning gradle offline mode on/off
tried "Enable parallel Gradle model fetching for Gradle 7.4+" but it turns off for every time i do a clone
turned off ms security too and added exclusions for sdk/gradle jdk , android studio
heap size is 2gb , my ram is 8gb , didn’t change the heap size

still nothing…

2

Answers


  1. Chosen as BEST ANSWER

    Download and install Android studio gradle offline this actually decreased the build time to 45 seconds 30k files no wonder it takes so much time thanks for the answer i will get better hardware as soon as i can


  2. 8GB is not much for running a modern OS. Android Studio and Gradle consume a lot of memory, so please verify how much memory is actually available when you start importing a project and monitor the available memory when AS is working. I suspect the OS must start early on swapping memory to the disk which is very slow (even when it is a SSD).

    The only viable solution is to upgrade to at least 16GB RAM. If you have a large project and many other apps open and possibly even multiple AS instances you want to have at least 32GB.

    In addition, a computer with only 8GB RAM probably also has a comparatively weak CPU which will noticably slow down Android Studio as well.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search