Project has no project.properties file

2019-02-06 06:01发布

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?

11条回答
Emotional °昔
2楼-- · 2019-02-06 06:21
Right click on project -->Android Tools-->Fix Project Properties.....
查看更多
对你真心纯属浪费
3楼-- · 2019-02-06 06:26

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.

查看更多
霸刀☆藐视天下
4楼-- · 2019-02-06 06:29

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..

查看更多
Ridiculous、
5楼-- · 2019-02-06 06:33

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

查看更多
Explosion°爆炸
6楼-- · 2019-02-06 06:34

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

查看更多
登录 后发表回答