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!
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 Lesson can't run initial_setup.bat
Dear all, i am starting to learn Android developer lesson.
when i execute initial_setup.bat i got these message
" D:\android_dev_environment>echo no | .\android-sdk-windows\tools\android creat e avd -n Android41 -t 1 --force This version of D:\android_dev_environment\Java\jdk1.6.0_35\bin\java.exe is not compatible with the version of Windows you're running. Check your computer's sys tem information to see whether you need a x86 (32-bit) or x64 (64-bit) version o f the program, and then contact the software publisher. Invalid path The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified.
seems that java is not suitable. i am running windows 7 32 bit but i failed to run initial setup for both 32 & 64 bit version with same error messages
when i tried to install eclipse i got same failure.
Ben JakubenTreehouse Teacher
Sorry for the trouble about the Windows bundle! I've been seeing more and more issues about this particular error and need to figure out how to recreate it and fix it. In the mean time, here's the response I've been sending members who have emailed email@example.com:
Your best bet to address this might be to switch to the Google bundle available at http://developer.android.com/sdk. This wasn't available when we made our Treehouse bundle, but it's almost exactly the same thing. We actually switch to this in the 2nd Android project since it's the official (supported) bundle from Google.
Download that and you can follow along with only a few minor differences. Setting up the project is slightly different, but after that it's pretty much the same. Let me know if you have any trouble and I can help iron out the differences.
One other thing, our bundle includes an AVD (emulator), but with the Google bundle you need to create your own. If you have any trouble you can check the 5:30 mark in this video from the 2nd project: http://teamtreehouse.com/library/android-development/build-a-blog-reader-app/exploring-the-masterdetail-template/creating-a-project-using-the-masterdetail-template
Here's a StackOverflow question about this issue that might help shed some light on your situation: http://stackoverflow.com/questions/5411238/android-sdk-android-bat-does-not-find-swt-jar-file
You might be able to manually configure your environment following the instructions in this Quick Tip video. Setting it up manually can be kind of a pain, but hopefully this Quick Tip spells it out in a way that addresses common problems.
James Barnett39,199 Points
- Double check what version of windows you are running
computer--> select properties
- note what it says under system type
- Download the appropriate installer
- Unzip the package
- Run the inital setup
- Specify the path as
Let us know if you are still having issues
Very nice to find this in Forum! I have the same problem - or my failure is:
"java.exe is not a valid Win32 application"
and it's the same, I guess.
I run XP 32 bit.<<
I have tried the above
Hello, Ben! It doesn't help ;-( Now it says to me "A Java Runtime Environment or Java Development Kit must be available in order to run Eclipse. No Java virtual machine was found after searching following locations: C:\Development\adt-bundle-windows-x86-20130219\eclipse\jre\bin\java w.exe javaw.exe in your current PATH" Thank you for help!
Ben JakubenTreehouse Teacher
Did you happen to move the bundle to a new location? If so, you would need to re-run the "initial_setup" script. That might be the problem, though I'm not quite sure from that error message. Or is this the Google bundle available from http://developer.android/com/sdk?
here too the problem occurs in the same way... it seems.[2013-09-27 11:41:21 - Emulator] PANIC: Could not open: C:\Users\Stark.android/avd/Android41.ini..could someone suggest me a way to find out
Hello, I am having sort of the same issue. My emulator runs but it doesn't display what I am trying to run. I have not been able to move forward because of this issue. I deleted my bundle and downloaded the one in your link but I am still having the same exact issue. It seems like it might be a path issue. I am new to this so any help is appreciated. I am running Windows 8.1 64 bit
When I try to run my app, the emulator runs but without my code. This is what the console states: [2014-04-15 18:25:31 - CrystalBall] ------------------------------ [2014-04-15 18:25:31 - CrystalBall] Android Launch! [2014-04-15 18:25:31 - CrystalBall] adb is running normally. [2014-04-15 18:25:31 - CrystalBall] Performing com.example.crystalball.MainActivity activity launch [2014-04-15 18:25:31 - CrystalBall] Automatic Target Mode: launching new emulator with compatible AVD 'Android44' [2014-04-15 18:25:31 - CrystalBall] Launching a new emulator with Virtual Device 'Android44' [2014-04-15 18:25:36 - CrystalBall] ------------------------------ [2014-04-15 18:25:36 - CrystalBall] Android Launch! [2014-04-15 18:25:36 - CrystalBall] adb is running normally. [2014-04-15 18:25:36 - CrystalBall] Performing com.example.crystalball.MainActivity activity launch [2014-04-15 18:25:36 - CrystalBall] Automatic Target Mode: launching new emulator with compatible AVD 'Android44' [2014-04-15 18:25:36 - CrystalBall] Launching a new emulator with Virtual Device 'Android44' [2014-04-15 18:25:40 - CrystalBall] New emulator found: emulator-5554 [2014-04-15 18:25:40 - CrystalBall] Waiting for HOME ('android.process.acore') to be launched...
Once it launches, it runs but without my text/code
Is it necessary to add the "bin" directory from the JDK folder to the end of the "PATH" environment variable?
JAVA_HOME => C:\Program Files\Java\jdk1.7.0_21 <-- "As instructed"
PATH => C:\Program Files\Java\jdk1.7.0_21\bin <-- "This solved my issue on all 32/64-bit Windows OS's"