安装新的 Android SDK 时遇到问题
我已经使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这个错误也让我很困扰。 其他帖子中描述的所有步骤对我来说都不起作用。 但我找到了解决方案,希望对其他人有帮助。
在您的项目主目录中,Eclipse 将创建一个
.classpath
文件。 在编辑器中打开它,并确保其中存在以下每一行。请注意,还有与您的项目相关的其他行,这样
没关系,关键是这一行是:
它需要在那里。 进行此更改并保存文件,然后重新启动 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.Note that there will be other lines relevant to your project like
that is okay, the key thing is this line is:
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.
我创建的所有新项目都会显示这一点,并且我已经完成了 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.
我必须使用
整个 sdk 目录(不仅仅是二进制文件)才能使其工作。
这不是安装说明的一部分。
你附加了路径变量吗?
I had to
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?