1

I've successfully installed JDK and also Android Studio both of 64bit and when I've created a new project, called GreetingApp Gradle Build starts and it shows an error with the title of Gradle GreetingApp project refresh failed Error:CreateProcess error=2, The system cannot find the file specified and also shows a small message that says Gradle Project sync failed. Basic functionality (e. g. editing, debugging) will not work properly.

How can I solve this?

Priyanka G
  • 47
  • 1
  • 2
  • 4
  • Possible duplicate of http://stackoverflow.com/questions/19874546/createprocess-error-2-the-system-cannot-find-the-file-specified-android-studio – Sanjeet Nov 08 '16 at 06:22

3 Answers3

0

Check jdk version using this path:

File > Other Settings > Default Project Structure > JDK location

If it is set to 32 bit version, set it to 64 version.

If you don't have a 64-bit JDK then download and install it.

Chandana Kumara
  • 2,485
  • 1
  • 22
  • 25
0

This is for people who are using Canary and are having this issue. I went to:

Files->Other Settings->Default Project Structure.

Change the JDK location: C:\from whatever you have here to: C:\Program Files\Android\Android Studio\jre

i used my old path from Android Studio.

-2017

0
  1. Close Android Studio
  2. On Windows open up System Properties > Advanced > Environment Variables...
  3. Click 'Path' and then click edit
  4. At the end of the 'Variable Value' add something like ';C:\Program Files\Git\cmd'
  5. Open Android Studio, clean, and build again

It took me more time to find the solution.

Anh Duy
  • 1,145
  • 15
  • 25