views:

608

answers:

4

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?

+1  A: 

Okay, what version of Eclipse and what OS? Are you on any 64 bit system OS?

Fred Grott
I'll add that now...
Dan Monego
A: 

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
SchlaWiener
if you put in the home folder yo do not have to :) Sorry, I am sued to putting developer sdks in my home directory to avoid such mistakes as forgetting to chmod and etc. Although at least on Debian there is a project at Launchpad to put Android Sdk in distros, its not stable yet.
Fred Grott
I have the sdk in my home folder, too. [/home/user/dev/android/android-sdk-windows-1.5_r1/tools]. I still had to chmod it, because (at least the 1.5 SDK) hadn't set the x-flag in the archive.
SchlaWiener
I just added the sdk to my /opt for system-wide installation (it's a workstation I'm sharing with a colleague), and I need to chmod -R 0777. But I'm not confortable with it. Though, I didn't find any documentation on exact permissions I should set.In Gentoo it works perfectly, just add the users allowed to use the SDK to the android group and that's it, under arch linux (which I'm currently using) I'm still a little lost.
Spidey
the post is a year old. Strange that google didn't fix this issue until now or at least provide information which permissions to set on the install page http://developer.android.com/sdk/installing.html
SchlaWiener
+2  A: 

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.

redsolo
I, uh, totally ran a clean on it before and it didn't work. I swear!
Dan Monego
+3  A: 

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.

omermuhammed