将 Android 项目档案导入 Eclipse 时出现问题 [英] Problem importing Android project archives into Eclipse

查看:33
本文介绍了将 Android 项目档案导入 Eclipse 时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这是一个愚蠢的新手问题,我很抱歉......

My apologies if this is a stupid newbie question...

我正在使用 Eclipse(Helios 版本)并按照 developer.android.com 的建议配置了所有 Android SDK.我可以毫无问题地创建和运行新项目,但我无法使用 Import > Existing Projects Into Workspace 导入存档的项目代码示例(在 Web 等上找到).

I'm using Eclipse (Helios release) and have the Android SDK all configured as per the developer.android.com recommendations. I can create and run new projects without any problem but I can't import archived project code samples (found on the web etc.) using Import > Existing Projects Into Workspace.

导入 zip 会创建一个项目,但不会将其创建为 Android 项目,并且控制台显示错误:项目没有 default.properties 文件!编辑项目属性以设置一个."

Importing a zip creates a project but it doesn't create it as an Android project and the console displays the error: "Project has no default.properties file! Edit the project properties to set one."

我已经尝试进入项目属性,但是一旦我在属性树中单击Android",就会出现一个弹出窗口,提示无法接受更改:当前显示的页面包含无效值"

I've tried going into the project Properties but as soon as I click on 'Android' in the properties tree a pop-up appears saying "Could Not Accept Changes: The currently displayed page contains invalid values"

参见:http://screencast.com/t/ZmY3ZWQ4

但是,如果我在自己的项目之一上执行此操作,则不会出现此类错误,并且我可以更改诸如 Android 平台/API 级别之类的内容.我还可以存档我自己的项目(使用导出)并再次导入它们而不会出现任何问题...坚果不是其他人的存档!我真的很傻吗?

But if I do this on one of my own projects I have no such error, and I'm able to change things such as the Android Platform/API level. I'm also able to archive my own projects (using export) and import them again without any problems... nut not other people's archives! Am I being really stupid?

任何帮助将不胜感激!

推荐答案

所有的基线 default.properties 需要一行如下:

All the baseline default.properties needs is a line like:

target=android-8

您很可能可以将另一个项目的 default.properties 复制到该项目中.Eclipse 的(不太)快速重启,工作区的重建,然后您就可以开始比赛了.

You can most likely copy another projects' default.properties into this project. A (not-so-)quick restart of Eclipse, a rebuilding of the workspace, and you're off to the races.

这真的很糟糕——我认为它应该作为导入过程的一部分发生.

It's really lame that this is needed -- it should happen as part of the import process, I would think.

这篇关于将 Android 项目档案导入 Eclipse 时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆