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

Aaron Farber
Aaron Farber
135 Points

ProcessNotCreatedException Cannot find file ...sdk\tools\android.bat - won't run/let me do anything

I'm trying to run Fun Facts activity but when I click to run, the event log reads this error ProcessNotCreatedException Cannot find file ...sdk\tools\android.bat and it also says VCs root error. The activity will not run and Android Studio will not let me run SDK or AVD managers--I thought maybe I had to download something. Help! Thanks everyone

Aaron Farber
Aaron Farber
135 Points

and when I look in the C\ program files \ android studio ... and so, I can't find the file referenced above. I'm really at a loss and stuck.

Hassam Uddin
Hassam Uddin
8,204 Points

Are you sure the SDK and the route to the SDK specified in Android Studio are in the same place?

Aaron Farber
Aaron Farber
135 Points

I'm not sure. I figured the route might be wrong. Android Studio won't let me do anything--run the emulator, set an AVD or access the SDK. Where do I change the route to the SDK in Android?

Hassam Uddin
Hassam Uddin
8,204 Points

ctrl+alt+shift+s --> Project Structure --> SDK location

If this doesn't match the one you installed, change it to the area that you installed it to.

Aaron Farber
Aaron Farber
135 Points

I appear to have figured out the issue. I was trying to run the program but it couldn't find the SDK. It turns out I had downloaded V22 and V23, rather than the older, but more widely accessible SDK V19. When trying to install 19, I encountered the same error in the SDK manager log:

"a folder failed to be moved. On Windows, this typically means that a program is using that folder (for example Windows Explorer). Please momentarily close any runnning programs that may be accessing the directory C:\Program Files\Android\android-sdk\tools"

I had to close the SDK manager after the error and open the Android_SDK\temp and \tools folders to unzip the tools tools_R_19. zip or something similar. I also ran android.bat as an administrator. Then when I made that change, Android SDK manager opened up on its own (I had closed it) and downloaded the API 19 packages. This article at Stack Overflow helped me out so much. Thank you Hassam for all the help and encouragement. Great community so far.

http://stackoverflow.com/questions/8555131/updating-android-sdk-a-folder-failed-to-be-moved

1 Answer

Aaron Farber
Aaron Farber
135 Points

I appear to have figured out the issue. I was trying to run the program but it couldn't find the SDK. It turns out I had downloaded V22 and V23, rather than the older, but more widely accessible SDK V19. When trying to install 19, I encountered the same error in the SDK manager log:

"a folder failed to be moved. On Windows, this typically means that a program is using that folder (for example Windows Explorer). Please momentarily close any runnning programs that may be accessing the directory C:\Program Files\Android\android-sdk\tools"

I had to close the SDK manager after the error and open the Android_SDK\temp and \tools folders to unzip the tools tools_R_19. zip or something similar. I also ran android.bat as an administrator. Then when I made that change, Android SDK manager opened up on its own (I had closed it) and downloaded the API 19 packages. This article at Stack Overflow helped me out so much. Thank you Hassam for all the help and encouragement. Great community so far.

http://stackoverflow.com/questions/8555131/updating-android-sdk-a-folder-failed-to-be-moved

Also after having downloaded multiple SDKs, Android Studio said that I had low memory at partition (when I tried to add 19) and called it a "fatal configuration error." After I deleted the unnecessary packages (22 + 23) and THEN installed 19, it worked without configuration error.

Hassam Uddin
Hassam Uddin
8,204 Points

Mark this as best answer so people don't continue to come and look at this.