2

My frustration runneth over. After two and a half hours, I throw myself on the mercy of the locals here. Long-time oo developer, looking at Android, so have to learn Java... Got eclipse, got it set up to build and run the HelloAndroid sample from the developer.android.com site. Then tried a couple more in a Beginning Android book.....all fine

Then realized I should stick with the straight Java before I went much deeper into Android, and started with some examples from Java for Android Developers... Took a while, but got that working...

Now I'd like to get back to building some basic Android apps. So I went back to run that HelloAndroid app. Still with me?
Console in eclipse says: “ERROR: Unknown command ‘crunch’

So I tried what's recommended here: http://www.technotalkative.com/android-error-unknown-command-crunch/ which basically says 'get your SDK release up to r14. Fine, because I realized my SDK had gotten old (currently at r10)

Except trying to do this from the Android SDK in eclipse throws this error several times: "A folder failed to move" and asks to turn off everything except my stereo (that's a joke) to release the file or folder.

Some research shows me that's crap, that the thing is running the update from the folder it wants to rename, so I try to run the suggestions found here: Can't upgrade Android SDK Tools

doing the folder copy and running the new folder's android.bat, with parms, from the console.

And I get "ERROR: No suitable Java found." Apparently, the find_java.bat only looks for java.exe in c:\Program Files\Java (64-bit and regular). I look on my PC and it's in c:\Program Files (x86)\Java\jdk1.6.0_21\bin and in c:\Program Files (x86)\Java\jre6\bin

BONUS DISASTERS: Tried to run my Java Updater (showing in the systray) since it said there were updates available, but could not download or update. Now, no icon...

And when I tried to update eclipse (build 20100218-1602) from its 'help' menu, as recommended at the same stackoverflow QnA thread('you need Eclipse 3.6 Helios or 3.7 Indico to upgrade your ADT revision 16.') this failed too. Four Available Updates of Android pieces (DDMS, Development tools, Hierarchy Viewer and Traceview) all fail because each " requires 'org.eclipse.ui 3.6.2' but it could not be found. "

Just ran a simple java project, one I'd already built and learned from a book's sample. Ran in eclipse. With the java that can't be found, apparently. Works fine...I lost the card game to the computer.

Maybe it would be smoother and simpler to just buy a Mac mini and learn ObjectiveC. The wife's already got an iPad...

Community
  • 1
  • 1
kzoom
  • 241
  • 1
  • 2
  • 12
  • 1
    sounds very angrily you written all that contain. ok first step , open your command prompt & type this command "java -version" and tell me whats the output ? – Lucifer Jan 24 '12 at 06:14
  • Doesn't clicking on `Help > Check for Updates` pop up Eclipse updates too? – Ghost Jan 24 '12 at 06:27
  • @Lucifer 'java' not recognized as an internal or external command – kzoom Jan 24 '12 at 22:21
  • @Ghost Yes it does, but they're along with the Android updates, and this version of eclipse doesn't provide a way to update eclipse first. It's kind of all-or-nothing. – kzoom Jan 24 '12 at 22:23
  • possible duplicate of ["Android Create" call fails in windows 7 - missing JDK](http://stackoverflow.com/questions/3052743/android-create-call-fails-in-windows-7-missing-jdk) – ChrisF Jun 30 '12 at 23:50

1 Answers1

1

Chances are you dont have java installed into your running PATH environment, and as such it can't find the java. There are steps to add this to your runtime environment, however; it change per OS. Specifically, if you want to fix it.. you need to put it into your PATH.xs

JoxTraex
  • 13,423
  • 6
  • 32
  • 45
  • OK, I have added the string ";c:\Program Files (x86)\Java\jdk1.6.0_21\bin" (minus quotes) to the PATH env var in my Win7Pro 64-bit OS. Running java -version in cmd.exe now returns java version 1.6.0_21 Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java Hotspot(TM) Client VM (build 17.0-b17, mixed mode, sharing). I will check the android.bat results in a bit. Want to see if there's a difference if i put the other java.exe on the PATH instead. – kzoom Jan 24 '12 at 22:31
  • Now the android.bat update sdk (in the copied directory) runs. AND>>> gives the Android SDK and AVD Manager's 'Load Add-ons List' window shos the following error: "Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml, reason: File not found". Another error to research and work around...Boy, I'm going to be good at all the reasons Android isn't ready for prime time... – kzoom Jan 24 '12 at 22:42
  • Download the latest version of the sdk and try again. If this persists then google this error and you'll see a solution. – JoxTraex Jan 24 '12 at 22:47
  • Found a workaround at answer#24 at this link http://code.google.com/p/android/issues/detail?id=21359. This still threw an error, but after cancelling back to the SDK and AVD window and clicking 'Update All...' I got 'updated to version 15.' Still need to see what that got me. More later. – kzoom Jan 24 '12 at 22:56
  • The /tools folder now has a file adb_has_moved.txt, whose contents is "The adb tool has moved to platform-tools/ If you don't see this directory in your SDK, launch the SDK and AVD Manager (execute the android tool) and install "Android SDK Platform-tools" Please also update your PATH environment variable to include the platform-tools/ directory, so you can execute adb from any location." – kzoom Jan 24 '12 at 23:31
  • Tried to update eclipse, still getting the "all fail because each " requires 'org.eclipse.ui 3.6.2' but it could not be found." error I mentioned under Bonus Disasters in original message. – kzoom Jan 24 '12 at 23:35
  • OK, MOVEd the /tools folder to /temp/PlatformToolPackage.old01 becauase even when i ran android.bat from a copy of the /tools folder, it complained about not 'being able to rename folder...'. Then the Android SDK updates worked OK. Currently at Android SDK Tools 16, Android SDK Platform-tools 10 when I run android.bat. – kzoom Jan 25 '12 at 01:01
  • But when I run what I thought was the same thing from inside eclipse, it recognizes all the updates except Android SDK Platform-tools, which it thinks is still at 3, saying 'Update available: rev.10'. And, as usual, it won't update eclipse because of the same problem listed in my original message above, the second item under BONUS DISASTERS, about 'org.eclipse.ui 3.6.2 cannot be found.' More research. Wow, can't wait to start learning Android. Maybe before it's as obsolete as every other platform I've programmed the last 30 years... – kzoom Jan 25 '12 at 01:01
  • Found this here: http://stackoverflow.com/questions/7082158/required-items-could-not-be-found-error-when-installing-adt-plugin and found that /updates/3.7 was disabled. Enabled it, And then ran the eclipse update. Selection now had an Eclipse IDE update as well as the four Android updates. Selected the IDE update only, it's downloading/installing now, and we'll see what happens. – kzoom Jan 25 '12 at 01:50
  • OK, restarted the elcipse IDE, now indigo, checked the Android SDK Manager running from within eclipse, and Android SDK Platform-tools still says 3, even though when I run android.bat, the Android SDK manager says Android SDK Platform-tools 10. WTF? From eclipse's 'check for updates', installed the 4 Android updates, no 'cannot be found' crap. restarted Eclipse again, as asked. And now, my helloAndroid app loads and runs. Yea... But Eclipse's Android SDK manager still thinks I'm on version 3, and I can't change that, because it runs from the same folder/file it wants to rename. later. – kzoom Jan 25 '12 at 02:22
  • that.. is a lot of problems. for such a simple install.. I don't know never had these problems. I think you may need to wipe EVERYTHING and start over this include eclipse and the SDK, make sure to delete all folders, do NOT RESUSE ANYTHING. Point the Eclipse ADT plugin to the SDK directory of the latets version you have. Also be sur eto download the latest tools/platforms available. These should be added WHEN you download them. – JoxTraex Jan 25 '12 at 03:51
  • Appreciate your sticking with this. If I thought I actually could remove everything, I'd try it. But between all the places (and names) used to place all this in various directories, as well as where it may have changed my registry, combined with Win 7's refusal to let even Administrator get at many of the directories on a Windows machine these days (HUGELY frustrating), I'd never know if any future problems were due to something I'd missed trying to clean this up. I'll keep posting on this thread as hat appears to be the last problem is worked on. – kzoom Jan 25 '12 at 19:02
  • OK, here's the last problem, as specifically as I can: When I run the eclipse indigo IDE, and invoke the Android SDK Manager from the Window menu there, Android SDK Platform-tools is listed as rev 3, rev 10 available, 1 package to install. Put when I try, it blows up with that 'unable to rename folder or file' error. But when I run android.bat from \android-sdk\tools, it shows that Android SDK Platform-tools is ALREADY at rev 10, and there are NO packages to install. To ask it simply: WTF? – kzoom Jan 25 '12 at 19:17
  • Like I said, you need to delete everything. Specifically don't use the installer.exe use the zip file as this allows you to change the path of referenece. – JoxTraex Jan 26 '12 at 01:30
  • Nope. Spent a couple hours doing the reading, and trying to get this revision upgrade to either run again or get recognized by the ADK withing Eclipse. Moving folders out of their own way (as noted by some bug reports above. This solved alot of probs earlier.) This ends up being my most frustrating issue, not becuase I couldn't fix it, but because, while switching things around and putting the back. suddenly, it's all OK. Hate not knowing specifically why something got fixed, but I won't look a gift horse...Been working in it for two days, all OK, so far. Thanks for watching out for me. – kzoom Jan 28 '12 at 03:28