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 Running the Fun Facts Project

david boggild
david boggild
237 Points

Choose device

Hi I am not getting the choose device dialog box opening in andriod studio.

I have tried clicking on the icon to open it.

How can I get it to open up?

Dave

2 Answers

Joe Purdy
Joe Purdy
23,237 Points

It sounds like Gloria is right and you need to create a new emulator in the Android Virtual Device (AVD) management window. This video on youtube describes the process of doing so in android studio in depth and may be of help: https://www.youtube.com/watch?v=-7oA_-F7cdM

If all else fails it may be an application error with your install of Android Studio in which case uninstalling and reinstalling may be necessary.

Let me know how that works out for you and if you have more questions!

david boggild
david boggild
237 Points

Hi thanks for replying, this is the message I get when i`m trying to create a virtual device.

Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\david\Downloads\android-studio-bundle-windows(1)\android-studio\sdk\build-tools\android-4.4W\dx.bat --dex --num-threads=4 --output C:\Users\david\AndroidStudioProjects\FunFacts\app\build\intermediates\dex\debug C:\Users\david\AndroidStudioProjects\FunFacts\app\build\intermediates\classes\debug C:\Users\david\AndroidStudioProjects\FunFacts\app\build\intermediates\dependency-cache\debug Error Code: 1 Output: 'C:\Users\david\Downloads\android-studio-bundle-windows' is not recognized as an internal or external command, operable program or batch file.

Joe Purdy
Joe Purdy
23,237 Points

I could be wrong here David, but it looks like there's an error in either your Android Studio installation or in the file path to your SDK tools. You have two conflicting paths to the AndroidSDK in that error output. The first lists the actual error as 'Failed to run command: C:\Users\david\Downloads\android-studio-bundle-windows(1)\android-studio\sdk\build-tools\android-4.4W\dx.bat'

Later there's an error that states "Error Code: 1 Output: 'C:\Users\david\Downloads\android-studio-bundle-windows' is not recognized as an internal or external command, operable program or batch file." The key difference between these errors is one state the location as "C:\Users\david\Downloads\android-studio-bundle-windows(1)" whereas the other drops the (1) and just states "C:\Users\david\Downloads\android-studio-bundle-windows".

Like I said, I could be wrong, but I'd guess that you downloaded Android Studio multiple times (hence the (1) after one of the installation directories) and you're getting errors from conflicting installs or misconfigured directories.

This stackoverflow question is similar to yours, you may want to look over it for help: http://stackoverflow.com/questions/24586400/cannot-run-any-project-in-android-studio-0-8-1

If you can't sort out the error I'd recommend uninstalling both Android Studio as well as the Java Development Kit (JDK) from your Windows computer. Once it's uninstalled delete any files located under 'C:\Users\david\Downloads\' that are related to Android Studio, make sure you save the files you have in 'C:\Users\david\AndroidStudioProjects\' since that looks like where you're keeping your app source code at. Once you clean out your system go ahead and reinstall JDK and Android Studio. That often clears up any weird application errors.

You have to create a virtual device first and then you will be able to choose a virtual device in some way. I don't fully understand what you mean but if you can elaborate it more maybe I can help better.

david boggild
david boggild
237 Points

Hi thanks for replying, this is the message I get when i`m trying to create a virtual device.

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\david\Downloads\android-studio-bundle-windows(1)\android-studio\sdk\build-tools\android-4.4W\dx.bat --dex --num-threads=4 --output C:\Users\david\AndroidStudioProjects\FunFacts\app\build\intermediates\dex\debug C:\Users\david\AndroidStudioProjects\FunFacts\app\build\intermediates\classes\debug C:\Users\david\AndroidStudioProjects\FunFacts\app\build\intermediates\dependency-cache\debug Error Code: 1 Output: 'C:\Users\david\Downloads\android-studio-bundle-windows' is not recognized as an internal or external command, operable program or batch file.

What is your operating system?