Leem.fin
Leem.fin

Reputation: 42622

Project has no project.properties file

I am developing Android app in Eclipse.

Currently, eclipse complains:

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

But I do have project.properties file under my project root folder. Why it complains?

This problem causes several of the resources in R.java can not be resolved in Activity. How to get rid of this problem?

Upvotes: 16

Views: 34726

Answers (11)

Machado
Machado

Reputation: 14489

The accepted answer may had the problem solved a few years ago but it doesn't work anymore with the more recent tools.

This is a known bug on Eclipse.

The only way to solve this problem is by creating again a project.properties file, which no one posted how it looks inside so I'll be posting this as an answer:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-19

Please note: set the correct target API for your project.

Upvotes: 7

Prasad Madushan
Prasad Madushan

Reputation: 171

i have same issue, simple way is

RightClick project file--> new --> file -->filename type file name as project.properties and --> finish --> inside project.propeties file type this target=android-17(your virsion of android)

then all errors go away

Upvotes: 0

Check file encoding. Apparently UTF-BOM is way too hard for whatever part of Eclipse-SDK is responsible for handling that project.properties file.

Upvotes: 0

Shiv
Shiv

Reputation: 1

Right click project -> Properties -> Java Build path -> Order and Export -> check the checkbox of Andorid 4.3.

Upvotes: 0

nikoo28
nikoo28

Reputation: 2971

If the project already contains a file default.properties you can open that file and edit+save it (add a space, save, remove that space, save). That worked for me.

Upvotes: 0

Patrik Pasko
Patrik Pasko

Reputation: 46

In case, you are importing new project from file folder, import this project as general project, not as Android project (I can not tell you why). After import, edit project.properties file, just add some character, then save the file. Now Eclipse recognizes project.properties file. Repair it(remove added character) and now the project should work fine.

Upvotes: 1

hoomi
hoomi

Reputation: 139

If it happens after importing from archive, I suggest to remove the project for the workspace and import it again. That was working for me.

Upvotes: 0

Omid Aminiva
Omid Aminiva

Reputation: 667

properties->Android lint preferences -> ignore all ->make a clean and build -> properties->Android lint prefrences -> include all

Upvotes: 1

neeraj t
neeraj t

Reputation: 4764

Generally Android Tools-->Fix Project Properties should work. but it didn't solve my problem. I had just delete project from from workspace and import again second time no problem..

Upvotes: 3

Enli
Enli

Reputation: 209

Sometime the 'Fix Project properties...' is not useful. I suggest that you can open that file and edit+save it, then delete the 'project.properties' file. At last you can create a new 'project.properties' file and paste the content of the old 'project.properties' file's content.

That worked for me.

Upvotes: 12

Samir Mangroliya
Samir Mangroliya

Reputation: 40416

Right click on project -->Android Tools-->Fix Project Properties.....

Upvotes: 19

Related Questions