Project has no file! Error in Imported Android Projects

By Akbar

I was working on Android demo application I downloaded from the web, and instead of creating new Project for this, I simply imported it (using File -> Import -> General -> Existing Project into Workspace). While the project was imported successfully, I was having this weird error:

Project has no file! Edit the project properties to set one

But when I went to the Project Properties, and clicked on the Android project, it gave me an error and returned back to the previous project properties page. Even after some tries, it allowed me to move to the Android page and select the target version, but the changes were not being saved.

Looking at the project files, I could see that it had “”, but not the “”. I tried to manually create the, but for some reason the error didn’t go away. After some research on the web, I found the info about this at Android Tools Project Site, and here are interesting info block: which is the main project’s properties file containing information such as the build platform target and the library dependencies has been renamed which is used only by Ant to override some Ant-specific build properties has been renamed Eclipse uses its own .classpath to store similar information and ignores this file.

So looks like the project I downloaded from the web was built using the ATD version 14+ version, while I had ATD 12.x on my machine. Once I have this info, the fix was simple. I simply renamed the “” to “”, and voila! It stared working as expected.

Update: I later found that there is even much simple way to handle this problem and that’s in case of any Project Properties issues,  Right click on the Project in Package Explorer, and choose Android Tools -> Fix Project Properties from the popup menu.

Tags: , ,