安装新的 Android SDK 时遇到问题

发布于 2024-07-24 04:06:39 字数 556 浏览 12 评论 0原文

我已经使用 eclipse 的软件更新功能安装了最新的 Android SDK,以访问 https:// /dl-ssl.google.com/android/eclipse/

安装后,似乎 SDK 已集成到 Eclipse 中,但是当我尝试创建一个包含单个空白活动的新项目时,出现以下错误:

[2009-06-06 11:41:24 - TestProject] no classfiles specified
[2009-06-06 11:41:24 - TestProject] Conversion to Dalvik format failed with error 1

This is using eclipse version 3.4.2 在 32 位处理器上的 Mac OS 10.5.7 之上运行。

这是我的配置错误吗? 我是否错过了安装的一部分?

I've installed the newest Android SDK using eclipse's software updates feature to hit the resource at https://dl-ssl.google.com/android/eclipse/.

After installing it, it seems like the SDK is integrated into Eclipse, but when I try to create a new project with a single blank activity in it, I get the following error:

[2009-06-06 11:41:24 - TestProject] no classfiles specified
[2009-06-06 11:41:24 - TestProject] Conversion to Dalvik format failed with error 1

This is using eclipse version 3.4.2 running on top of Mac OS 10.5.7 on a 32 bit processor.

Is this a misconfiguration on my part? Have I missed a part of the installation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

森林很绿却致人迷途 2024-07-31 04:06:39

这个错误也让我很困扰。 其他帖子中描述的所有步骤对我来说都不起作用。 但我找到了解决方案,希望对其他人有帮助。

在您的项目主目录中,Eclipse 将创建一个 .classpath 文件。 在编辑器中打开它,并确保其中存在以下每一行。

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

请注意,还有与您的项目相关的其他行,这样

<classpathentry combineaccessrules="false" kind="src" path="/project-name"/>

没关系,关键是这一行是:

<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>

它需要在那里。 进行此更改并保存文件,然后重新启动 Eclipse。 在主菜单中,执行Project -> 干净。。 现在,在项目资源管理器中,在您刚刚创建的新项目上,右键单击 -> 属性-> 安卓-> 检查 Android 1.5 -> 单击“应用”按钮。

下一个项目,右键单击 -> 属性。。 在左侧菜单中,单击Java Build Path,在右侧面板上,单击Libraries选项卡。 确保您看到一个名为“Android 1.5”的文件夹。 现在点击“确定”,您的项目应该可以编译。

在“库”选项卡中,如果您看到 Android.jar,则必须手动删除它(突出显示并单击“删除”按钮),然后此错误就会消失。

This error bothered me quite a bit too. All the steps described in other posts didnt work for me. But I found the solution and I hope it will help others.

In your project home, Eclipse will create a .classpath file. Open it in an editor, and ensure that each of the following lines exist in it.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

Note that there will be other lines relevant to your project like

<classpathentry combineaccessrules="false" kind="src" path="/project-name"/>

that is okay, the key thing is this line is:

<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>

It needs to be in there. Make this change and save the file, and restart Eclipse. In main menu, do Project -> Clean. Now in project explorer, on the new project you just created, Right Click -> Properties -> Android -> Check Android 1.5 -> Click Apply Button.

Next project, Right Click -> Properties. In the menu on left, click on Java Build Path, on right panel, click on Libraries tab. Ensure that you see a folder called "Android 1.5". Now hit OK and your project should compile.

In the Library tab, if you see Android.jar then it must be deleted manually (highlight and click "Remove" button) and then this error will be gone.

血之狂魔 2024-07-31 04:06:39

我创建的所有新项目都会显示这一点,并且我已经完成了 SDK、Eclipse 和插件的全新安装。 在 Eclipse 中通过 Project->Clean 进行清理总是可以解决问题。 烦人,是的; 大问题,不。

This always shows for all new projects I create, and I have done a clean installation of SDK, Eclipse and plugins. Doing a clean through Project->Clean in Eclipse always solves the problem. Annyoing, yes; big problem, no.

仅此而已 2024-07-31 04:06:39

我必须使用

chmod -R 777

整个 sdk 目录(不仅仅是二进制文件)才能使其工作。
这不是安装说明的一部分。

你附加了路径变量吗?

export PATH=${PATH}:<your_sdk_dir>/tools

I had to

chmod -R 777

the whole sdk directory (not only the binaries) in order to make it work.
Which was not part of the instlallation instruction.

And have you appended the path variable?

export PATH=${PATH}:<your_sdk_dir>/tools
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文