在Eclipse开放的Android样本 [英] Opening Android samples in Eclipse
问题描述
我的机器结果
Windows 7的
My machine
Windows 7
问题结果
我无法打开样品进行了Android SDK。结果
我已经成功地跑了一个Hello Android的。
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)
每个错误(除APIDemo)结果
无法写入文件:... \\ Android的\\ Android的SDK \\ \\平台Android的4 \\ SAMPLES \\ LunarLander.project。
Every error (except APIDemo)
Could not write file: ...\Android\android-sdk\platforms\android-4\samples\LunarLander.project.
原因:结果
无法写入文件:... \\ Android的\\ Android的SDK \\ \\平台Android的4 \\ SAMPLES \\ LunarLander.project。
Reason:
Could not write file: ...\Android\android-sdk\platforms\android-4\samples\LunarLander.project.
APIDemo误差结果
与命名空间的项目已经存在于工作区
APIDemo error
A project with that namespace already exists in the workspace
事情我都试过结果
右键单击文件夹的样品 - >属性 - >取消勾选只读结果
(出于某种原因,它随机重新检查只读)结果
右键单击文件夹的样品 - >属性 - >安全 - >编辑 - >用户 - >完全控制结果
哭泣的结果
重新安装SDK结果
谷歌,StackOverflow的相关问题。
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
感谢您的帮助!
推荐答案
您需要做到以下几点:
文件 - >新建 - > Android项目
File -> New -> Android Project
然后,选择从现有的开源项目,并浏览到SDK目录样本目录。之后,选择构建目标,然后单击完成。
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".
该项目应该出现在Eclipse作为一个常规项目。
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.
这篇关于在Eclipse开放的Android样本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!