Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top