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/.
我已经使用eclipse的软件更新功能安装了最新的Android SDK,以访问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:
安装后,似乎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
running on top of Mac OS 10.5.7
on a 32 bit processor.
这是在32位处理器上使用运行在Mac OS 10.5.7之上的eclipse版本3.4.2。
Is this a misconfiguration on my part? Have I missed a part of the installation?
这是我的错误配置吗?我错过了部分安装吗?
3 个解决方案
#1
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,Eclipse和插件的干净安装。通过Project-> Clean in Eclipse彻底解决问题。 Annyoing,是的;大问题,没有。
#2
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.
在项目主页中,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>
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.
它需要在那里。进行此更改并保存文件,然后重新启动Eclipse。在主菜单中,执行项目 - >清理。现在在项目浏览器中,在您刚创建的新项目上,右键单击 - >属性 - > Android - >检查Android 1.5 - >单击应用按钮。
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.
下一个项目,右键单击 - >属性。在左侧菜单中,单击Java Build Path,在右侧面板上,单击Libraries选项卡。确保您看到名为“Android 1.5”的文件夹。现在点击OK,你的项目应该编译。
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.
在“库”选项卡中,如果您看到Android.jar,则必须手动删除它(突出显示并单击“删除”按钮),然后此错误将消失。
#3
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.
整个sdk目录(不仅是二进制文件),以使其工作。这不是安装指导的一部分。
And have you appended the path variable?
你有附加路径变量?
export PATH=${PATH}:<your_sdk_dir>/tools
#1
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,Eclipse和插件的干净安装。通过Project-> Clean in Eclipse彻底解决问题。 Annyoing,是的;大问题,没有。
#2
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.
在项目主页中,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>
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.
它需要在那里。进行此更改并保存文件,然后重新启动Eclipse。在主菜单中,执行项目 - >清理。现在在项目浏览器中,在您刚创建的新项目上,右键单击 - >属性 - > Android - >检查Android 1.5 - >单击应用按钮。
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.
下一个项目,右键单击 - >属性。在左侧菜单中,单击Java Build Path,在右侧面板上,单击Libraries选项卡。确保您看到名为“Android 1.5”的文件夹。现在点击OK,你的项目应该编译。
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.
在“库”选项卡中,如果您看到Android.jar,则必须手动删除它(突出显示并单击“删除”按钮),然后此错误将消失。
#3
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.
整个sdk目录(不仅是二进制文件),以使其工作。这不是安装指导的一部分。
And have you appended the path variable?
你有附加路径变量?
export PATH=${PATH}:<your_sdk_dir>/tools