Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (2014) Getting Started with Android Setting Up an Android Development Environment for Windows

Mit Sengupta
Mit Sengupta
13,823 Points

Why my SDK manager isn't running and the gradle failing continually?

I have all things checked as Ben says. I have installed and defined the JAVA_HOME variable in the correct place(without that not being defined the android studio won't even run). But the android studio does run but the sdk manager fails to open everytime. Initially, it was working but after sometime this is happening.

Well this is the message I get everytime when I try to open the SDK manager in the android studio :

Cannot launch SDK manager. Output:

'"C:\Users\Mit\AppData\Local\Android\sdk1\tools\lib\find_java64.exe" -s' is not recognized as an internal or external command, operable program or batch file.

ERROR: No suitable Java found. In order to properly use the Android Developer Tools, you need a suitable version of Java JDK installed on your system. We recommend that you install the JDK version of JavaSE, available here: http://www.oracle.com/technetwork/java/javase/downloads

If you already have Java installed, you can define the JAVA_HOME environment variable in Control Panel / System / Avanced System Settings to point to the JDK folder.

You can find the complete Android SDK requirements here: http://developer.android.com/sdk/requirements.html

Harry James
Harry James
14,780 Points

Hey Mit!

Can you navigate to C:\Users\Mit\AppData\Local\Android in Windows Explorer (The file browser) for me and let me know what folder(s) are there?

10 Answers

Mit Sengupta
Mit Sengupta
13,823 Points

Hi Harry, I'm unable to locate it and I wonder why. It seems that directory doesn't exist at all! Can you dissect the problem? Although, when I installed the SDK previously in D drive not in C drive (as it's now) I was able to find the SDK folder. What should I do? My JDK ver. is 1.8.0_45 and Android Studio ver. is android-studio-bundle-141.1903250 .

Mit Sengupta
Mit Sengupta
13,823 Points

Hi Harry, I tried on a different computer and it's working just although with some XML error, the SDK manager is opening up OKAY. So what you think I should do? The issue seems to be with my laptop.

Harry James
Harry James
14,780 Points

That would be where the problem is then!

Can you try to find where your SDK is actually located and follow the steps below to update the location?:

In Android Studio, go to File >> Project Structure:

Then, under Platform Settings >> SDKs, check the home paths of your Java SDK and the Android SDK's you are using in your projects. Make sure they are pointing to the correct places and if not, redirect them by clicking the ... button:


If you are unable to find the SDK, you can download it here at the bottom of the page where it says SDK Tools Only.

If you are unable to find the JDK, you can download it here.


Hopefully this should fix the problem but if not, give me a shout and I'll see what else can be done :)

Mit Sengupta
Mit Sengupta
13,823 Points

Harry, thank you so much for taking the time to dissect the problem. Unfortunately, the problem still persists even when I download the SDK separately and then direct it to the new folder in the project structure as (D/sdk) but I still get the same pop up error but this it's says : "C:\Users\Mit\AppData\Local\Android\sdk1\tools\lib\find_java64.exe" -s' is not recognized as an internal or external command, operable program or batch file. I'm also conitually getting Gradle build errors!

Harry James
Harry James
14,780 Points

Hmm...

I'm not sure where your android.bat is being called from in this case. Can you try putting your SDK inside of the \Android\sdk1 directory? This is where it's looking to run the find_java64.exe file.

Mit Sengupta
Mit Sengupta
13,823 Points

I have installed the SDK in a different drive now and this time at drive D from C. In the project structure I have set the directory : D:\SDk . And now I get the error : '"D:\SDk\tools\lib\find_java64.exe" -s' is not recognized as an internal or external command, operable program or batch file.

I have no clue why it's not still working. Do you know my Gradle is showing error?

Harry James
Harry James
14,780 Points

Are you able to navigate to D:\SDk\tools\lib\ and see if that directory exists and then see if find_java64.exe exists?

Mit Sengupta
Mit Sengupta
13,823 Points

Harry, yes, that thing does exist but when I'm clicking on the file : find_java64, it opens up and closes immediately!

Harry James
Harry James
14,780 Points

Yes, that should happen when you try to open a command prompt .exe file.

I wonder if there's a problem on what it returns.

Open Command Prompt by pressing Start+R and type in cmd.exe.

Then, type D: into the command prompt to change the drive.

After that, type cd D:\SDk\tools\lib\ and then tell me what it returns when you type the following commands in:

  1. find_java64
  2. find_java64 -s

Speak to you soon! :)

Mit Sengupta
Mit Sengupta
13,823 Points

Okay, I did exactly what you said. Here what happened : After changing the drive to D, I typed - D:\SDk\tools\lib\ it returned : 'SDk\tools\lib\' is not recognized as an internal or external command, operable program or batch file. Then I typed - find_java64 , it returned : 'find_java64' is not recognized as internal or external command, operable program or batch file.

They I type - find_java64 -s , it returned : 'find_java64' is not recognized as internal or external command, operable program or batch file.

Harry James
Harry James
14,780 Points

Hey again Mit!

Did you type cd before the second command? It looks like you might have missed that out which would've caused you to get them messages.

Mit Sengupta
Mit Sengupta
13,823 Points

Harry, now I did. When I typed - D:\SDk\tools\lib>find_java64 it returned : C:\Program Files <x86>\Java\jdk1.7.0_67\bin\java.exe and when I typed - D:\SDk\tools\lib>find_java64-s it returned : 'find_java64-s' is not recognized as an internal or external command, operable program or batch file.

Harry James
Harry James
14,780 Points

Right! This is where the problem lies.

Please follow the instructions in my answer above (Not these comments) but use these paths:

Android SDK Location: D:\SDk

JDK Location: C:\Program Files\Java\jdk1.7.0_67

(For the JDK Location, I'm assuming the space at the end of Program Files you talked about above was a typo - correct this if not)


You may then need to Invalidate Android Studio's caches. To do this, click on the File tab then Invalidate Caches / Restart and press Invalidate and Restart:


Hopefully this will then fix your problem but if not, there are a few last things we can try :)

Mit Sengupta
Mit Sengupta
13,823 Points

Hey Harry, I wanted you say this that from the very first time my Android emulator never worked. I mean it starts but it never runs the app.

Mit Sengupta
Mit Sengupta
13,823 Points

Harry, I'm still getting this same message : '"D:\SDk\tools\lib\find_java64.exe" -s' is not recognized as an internal or external command, operable program or batch file. :(