Opening Android samples in Eclipse

谁说胖子不能爱 提交于 2019-12-14 03:08:40

问题


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!


回答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.



来源:https://stackoverflow.com/questions/5845320/opening-android-samples-in-eclipse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!