0

My machine
Windows 7

Problem
I'm having trouble opening samples for the Android SDK.
I have successfully ran a "Hello Android".

Steps I'm doing:
Make new project -> Create from sample -> (some demo)

Every error (except APIDemo)
Could not write file: ...\Android\android-sdk\platforms\android-4\samples\LunarLander.project.

Reason:
Could not write file: ...\Android\android-sdk\platforms\android-4\samples\LunarLander.project.

APIDemo error
A project with that namespace already exists in the workspace

Things I have tried
Right click samples folder -> Properties -> Uncheck "Read Only"
(For some reason, it randomly rechecks Read Only)
Right click samples folder -> Properties -> Security -> Edit -> User -> Full Control
Crying
Reinstalling SDK
Google, stackoverflow relevant questions

Thanks for your help!

Dennis Benson
  • 11
  • 1
  • 6
  • 1
    Probably your problem may be similar to this [How do I open a sample Android SDK app in Eclipse](http://stackoverflow.com/questions/4588973/how-do-i-open-a-sample-android-sdk-app-in-eclipse). If not, you can always try what I've posted in the answer below. – CRM Apr 30 '11 at 23:58

1 Answers1

1

You need to do the following:

File -> New -> Android Project

Then, select "Create project from existing source", and browse to the samples directory in the SDK directory. Afterwards, choose a build target and click "Finish".

The project should appear in Eclipse as a regular project.

If you get an error doing this, that means that the project already exists in the workspace.

CRM
  • 4,569
  • 4
  • 27
  • 33