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?
Right click on project -->Android Tools-->Fix Project Properties.....
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.
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.
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..
properties->Android lint preferences -> ignore all ->make a clean and build -> properties->Android lint prefrences -> include all
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.
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.
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.
Right click project -> Properties -> Java Build path -> Order and Export -> check the checkbox of Andorid 4.3.
Check file encoding. Apparently UTF-BOM is way too hard for whatever part of Eclipse-SDK is responsible for handling that project.properties file.
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