Mox_z
Mox_z

Reputation: 520

Android studio Gradle sync fails

I recently had to reinstall Windows 10 on my laptop and only had the 32 bit Verizon available. After that I have had continuous problems with Android studio. I first installed the standard version (2.3) and it installed fine but I had to fiddle around with the jdk path it was using because apparently studio ships with a 64bit version by default.

After that, I was not able to use the emulator at all. I tried several fixes and nothing worked. So, I uninstalled and tried the new Canary dev preview. This also installed but I was unable to sync Gradle because of the jdk path. Fixed that, the same way but then I encountered errors stating: failed to complete gradle execution cause: gradle build daemon disappeared it may have been killed or crashed unexpectedly. I tried editing the custom VM options but it this did not work. Also after editing Android studio would not restart at all.

So I deleted the custom VM options and I restarted again. I tried going to Settings > Gradle > Gradle VM options (as described on another article from this site) but I could not find that menu entry at all. I do not know what to do. And do not want to reinstall Windows 64 bit (but never had these problems then). Is there any other suggestions that maybe I have not tried?

Upvotes: 1

Views: 365

Answers (3)

Jelena Petrovic
Jelena Petrovic

Reputation: 39

Thanks for help. Finally done. I resolved uninstalling Android Studio. The real problem was SDK. When you uninstalling AS SDK is still on computer, and I deleted all these files from SDK folder. The best option if you install AS and SDK directly on C:. After that AS working without any problems.

Upvotes: 0

Mox_z
Mox_z

Reputation: 520

I was a able to finally resolve this problem. What I did was 1. Uninstall Android studio 2. Manually delete any files or folders related to studio missed by the uninstaller 3. Reinstall Android studio but select custom instead of recommended for install options and for install locations of sdk and Android studio I chose to creat a new folder at the root of my C: drive and install there. 4. When starting studio I had a gradle sync error stating this version of %1 is not compatible with the version of Windows you are running... To fix this I changed the jdk location used by Android studio from the embedded jdk to the one I had installed. 5. Updated all components and then encountered a new error when attempting to run an imported project stating "error installing apk" and asking me to try uninstalling it and reinstalling. 6. I tried several solutions but the one that worked in the end was disabling instant run Thanks for the support @Jelena hope this helps

Upvotes: 1

Jelena Petrovic
Jelena Petrovic

Reputation: 39

I have the same problem. you can follow all these steps

Start with change compile sdk to 25 and after that dependencies(AS will give you). Hope we will get right answer.

Upvotes: 0

Related Questions