Android Studio - automatic gradle sync at startup - android-studio

Yesterday I updated the Android Studio to 2.2 (from 2.1.3). Since that the Android Studio always start gradle sync at startup on every opened projects. I found this question and I tried Mick's suggestion, but unfortunately that did'nt worked for me.
If I open Android Studio, and I wait until load my projects, sync gradle and then I close Android Studio (without any change on my projects), and after that, I open it again, AS also do the same as before (run a gradle sync again senselessly).
I think, this is not a serious problem, but it's pretty weird, because it sync senselessly (otherwise I start gradle sync manually if I need to, but AS start it on every startup senselessly), and I need to wait little more to start coding (a little waste of time and energy).

Maybe this is what you want.
gradle --stop

Related

Android studio 3.4 taking too much time to build the project

After updating the android studio to android 3.4 it's taking too much time to build the project before that it's taking only a few minutes but now it's taking too much time
EDIT
even after one hour it keeps building the project.
#VirendraVarma Your solution worked for me, Appreciate it, but just to make it clear for everyone else.
1. Close the current Android Studio project
2. Go to your project's directory and delete all build, .gradle, .idea folders. Also any unfamiliar files as stated by Varma.
3. Now at the Android Studio welcome screen, click on open an existing Android Studio project and the rest should be quite straightforward.

Android Studio 3.0 VERY VERY VERY slow on run

I have a very big problem using Android Studio.
Every time I make a code changing, I have to check if all has gone well launching my app; but as soon as I click the "Run app" or the "Apply changes", it's the end: it starts the Gradle build process, which take even 30 minutes to complete, and furthermore Android Studio take the full control of my computer, not allowing to do nothing anymore (like open the browser, open notepad++, and so on...).
Can anyone help me?
Thanks
If you use Eclipse you won't have this problem anymore. but if you want to stick with android studio and gradle you can run your emulator and gradle once and whenever you want to compile your code run it on the already built gradle. this means that do not close the emulator and run your program on it again and again. this way you will not have to spent alot of time on loading the emulator and gradle
Android Studio is not a very light software.It uses a lot of your system RAM and CPU power.So if you are using an old system then it is obvious that android studio will run slow.If possible then upgrade your system.
And one more thing it's better to use actual device rather than Virtual Emulator for our application working test.

Scanning project directories android studio

When I open my Android Studio 2.1.2 it performs Scanning project directories... background task infinitely and I cannot check through my code. This has not happened before as I have been using the studio for quite a while without the prob and I have not changed any files. I have tried restarting the studio severally but it doesn't help and have also checked the internet but it only offers solutions for Scanning files to index... infinite background task. So what might be the prob and how can i fix it??
Not sure how to actually fix but a workaround would be to go to File --> Invalidate Caches / Restart option.
That usually seals the deal for me when Android Studio is stuck Scanning directories or indexing.

Android Studio download gradle takes forever

Everytime an imported project requires a specific version of gradle I don't have, it starts to sync. At this time, I close Android Studio, connect to vpn, and reopen Android Studio to sync gradle; however, sync never ends. Then I go to .gradle/wrapper/dists/gradle-xxx-all and nothing is downloaded (zip.part 0Kb). When I connect to vpn I can access gradle.org and download manually. Is this a bug with Android Studio or gradle?
There are many similar questions and most are solved by manually downloading the zip package. None solve the problem completely, though.
Follow below step to set automatically gradle sync in your android studio.
File -> Settings -> Build,Execution,Deployment ->Build tools -> gradle ->
check Use Default gradle wrapper(recommended) radiobutton.
Also follow below step to restart your android studio for invalid cache restart.
File > Invalidate Caches/Restart (you can also manually remove the cache at ~/Library/Caches/{yourIDEName} and restart the IDE)
Then save settings and rebuild your project.
Edit: See Android 1.5 Gradle Sync never completes to get more idea.
I hope its helps you.

Android Studio Gradle editor runs very slow

The Gradle editor of my Android Studio (1.2.1.1) is painfully slow.
Every time I type a few characters it freezes for a few moments.
Under Preferencs->Editor->Inspections I already deactivated everything in the gradle section in the hope that this would speed it up again.
My colleague has the same issue, we're working with AS+Gradle for about a week now.

Resources