Scope
Because I was trying Ubuntu 10.10 on my laptop, I had to install a new development environment. Not too much work: I’ve used the installing instructions from Google [1].
This basically boils down to:
- Install Eclipse (I just used the ubuntu software center for this).
- Download Android SDK and unpack it.
- Install Android ADT plugin for Eclipse using the Eclipse install-software feature [2]
- Set the path to the android SDK / tools (step 2) in the Eclipse preferences.
I didn’t install the JDK, because it was on my machine by default. I assume the package manager has that, but I’m not sure. Now I’m all happy with my new toys, installing Subclipse for SVN, getting my source, and coding away. Then the trouble started :)
Symptoms
It seems that I couldn’t start any Android Virtual Device (AVD). I made a new run configuration, but it didn’t start. Instead I got an error, stating:
‘Launching android’ has encountered a problem.
An internal error occurred during : “Launching android”.
Clicking “details >>” produces an extra line:
Path for project must have only one segment
And, for full disclosure, the complete log-entry included trailing this post.
Cause & Solution
It seems that this rather cryptic message means nothing more in my case than “please enter a name and project for your run configuration”. I did have a “name”, but left the “Project” field empty. Entering a value in the ‘project’ (the “AndroBlip” you see next to ‘browse’) fixed it. Sources seem to indicate that the same error is produced if you don’t enter a value in the ‘name’-field.
References
- http://developer.android.com/sdk/installing.html
- https://dl-ssl.google.com/android/eclipse/
- http://stackoverflow.com/questions/4961151/android-path-for-project-must-have-only-one-segment
Complete error log
!ENTRY org.eclipse.core.jobs 4 2 2011-02-20 12:12:00.397!MESSAGE An internal error occurred during: “Launching android”.!STACK 0java.lang.IllegalArgumentException: Path for project must have only one segment.at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:181)at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.getProject(Unknown Source)at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(Unknown Source)at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
OMG, thanks for the hint, it could have taken hours to find that.
What a useless error message.
cheers
Thanks a lot for this guide. I was really lost with this error.
Perfect! I feel like such an infant. Who would have thought that it was something so simple.
Baby Geek
Really glad it actually helped people that I posted this, that was the goal :D
Adding my thanks to the list – this was one of the stupidest error messages I have ever seen.
Thank you! I feel stupid now that I know the reason, but then I look at the error message and realize it’s not all my bad.
Thank you so much. Like everyone else, couldn’t for the life of me figure out what this error was.
this is great .. i was trying to get rid of this error.. hope u work more
only took me 10 seconds to debug…cause i saw this. THANKS! i had a blank configuration.
Thank you, got the error while just creating a new project and know I am up to go again =)
Thanks for leaving a comment people ;D
Thanks. I’ve had so many problems with eclipse giving out such cryptic errors – thank god for google/internet search – as I wasted much time trying to figure out what this means.
Having come from working in Xcode I’m finding eclipse is very picky about various settings, and has some frustrating features such as forgetting that you have Android tools at a particular location, just because you created a new workspace.. I realise that it’s because you may use different API level tools for different projects, but it would be nice if it remembered the last one you had set-up..
Yeah, I know, It can be a problem, you have to remember all the seperate parts you need to check. “quickly” setting up a workstation as a development environment isn’t that quickly :(
Hi, trying my best to log in, but every time I get “Sign In denied”. I am using the same password as on the computer. ???
Thanks for the solution. I was trying to solve it by myself but you helped me out.
Thanks alot! Five second fix
Than you dude!!!! Amazing how simply yet hard to find was this problem!!!
Thanks for the post. Solved my problem!
thanks a lot brother for the post……..
Thanks for that, was really getting frustrated getting stopped in my tracks.
Sure as heck saved my hiney. Thanx!
saved my time :) :)
Glad to have helped, and again: thanks for leaving a comment :)
Thank’s! Very usefull)
thanks dude,,
Thanks for posting this!
Thanks for helping java to be more dev friendly!
Thanks!
Thanks, had the same problem and resolved it fast with your help!
Thank you :)
Thanks! Stupid error message -_-
thank you ^^
thanx alot
Very happy this is still helpfull, amazed that it isn’t updated to something more understandable :)
it did not work for me. are there other options?
Well, not that I know of. You could double-check all the fields, make sure you have entered a valid name and selected an existing project, and maybe other fields suffer from this weird error too.
Otherwise I wouldn’t really know, although you might be finding yourself looking at the actual error, meaning that in this case there really is something wrong with the path? I’m not really sure what “only one segment” means in this case. Sorry :(
Awesome, saved me lots of time : D
Worked! Thanks.
Worked for me also.
Thanks. :)
worked for me…..
Thanks for the helpful info,,,,
Thanks for posting, saved me time.
Thanks! Now I can code instead of bashing my head against the wall.
Worked for me. Thanks!
This really helped!
Perfect, thanks. Helped a lot!
Thanks alot, It worked for me :)
Thank U
Thanks so much for this!
Thanks, solved the issue :)
Hahaha well done!! :) Why doesn’t google make an SDK that’s just complete and well less buggy :(
Awesome! It worked! Thank you for the helpful post!
thank you very much
Thank you from me too, had same problem.
I was just trying to fix this thing from 12 hours your solution finally helped me out thanks a lot man
ai caramba, why don’t they just have an error message that goes something like “hey, something is wrong somewhere in your project, but just for fun I’m not going to tell you where- how about if ytou spend hours guessing!”
PS -thank you for the post!
Thanks for the thanks everyone :D
thanks! Helped me
Cheers dude, life saver!
Thanks a lot
You, sir, are the best.
Thank you very much, really helped!
Thank You, saved lot of time.
Thanks for removing the roadblock
Thank you. I’ve made 10 different projects so far, including 2 today, and never had this problem until my most recent, for some mysterious reason. Good thing for this clear explanation. :)
Thnx a lot that helped me :D