2

I'm facing an issue in Android Studio, whenever I create a new project the Gradle Build or Sync takes hours to get completed.

Also if I close the project and reopen it, the Gradle sync takes a long time for the same project for which the build was successful initially.

My system config -

  • 1 TB Hard Disk
  • 16 GB Ram
  • 64 bit Windows 7 Professional

Tried this and this as well, but still the build takes a very long time to complete.

Can someone please explain to me the reason for this and also please let me know how to improve the performance of it.

Community
  • 1
  • 1
Shashi Kiran
  • 362
  • 2
  • 9
  • 27

4 Answers4

2
  1. Enable gradle offline work setting -> build tools -> gradle

2.create gradle.properties in following directory ~\Users\"username" \ .gradle and add the following in gradle.properties

org.gradle.daemon=true

Javad Jafari
  • 710
  • 6
  • 11
1

Check gradle setting and customize default setting to ::

1.Use local gradle destribution 2.Check Offline work

Settings

R_K
  • 803
  • 1
  • 7
  • 18
0

enter image description here

enter image description here

1.change complier settings .

2.give android studio more resources.

3.remove unuse plugins . some vision control plugins

tiny sunlight
  • 6,231
  • 3
  • 21
  • 42
0

It depends mostly on the internet connection and the number of library dependencies you have in your app. Sometimes a sync can take between 20 seconds and 10 minutes approximately, according to the background processes your pc may be doing.

You can check tak manager for your PC and check if there are any programs taking loads of CPu usage or memory.

However since your PC has 16gig of RAM, I fear that the issue is in the number of dependencies your app has. A question which could be related is the following

Hope this helps :)

Community
  • 1
  • 1
Michele La Ferla
  • 6,775
  • 11
  • 53
  • 79