Android 项目没有 project.properties 文件!编辑项目属性以设置一个

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11664568/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:24:14  来源:igfitidea点击:

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

android

提问by Joker

Because of some problem I restored my XP. but now some of my projects don't work. it giving me the following error:

由于一些问题,我恢复了我的 XP。但现在我的一些项目不起作用。它给了我以下错误:

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

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

I dont know what to do? Plz Help.Thanks in Advance!!!!
I also backed up my .android folder from system drive.

我不知道该怎么办?请帮助。提前致谢!!!!
我还从系统驱动器备份了我的 .android 文件夹。

回答by Siebe

Going to the PropertiesAndroidand setting a target won't work since setting the target won't create the project.properties file.

转到PropertiesAndroid并设置目标将不起作用,因为设置目标不会创建 project.properties 文件。

The fix is to:

解决方法是:

  • Manually create an empty project.properties file in the project root folder.
  • Open the PropertiesAndroid
  • Set the desired Target
  • Refresh the project
  • 在项目根文件夹中手动创建一个空的 project.properties 文件。
  • 打开PropertiesAndroid
  • 设置所需的目标
  • 刷新项目

After this the error should be gone.

在此之后,错误应该消失了。

回答by Siebe

You should check this.

你应该检查一下

Don't import it into Eclipse, use create new project from existing source in Eclipse

不要将其导入 Eclipse,在 Eclipse 中使用从现有源创建新项目

回答by ednicman

Mouse over any error in your java import line then press F2, scroll down and choose Fix project setup. A project setup fixes dialogbox will appear, then press ok.

将鼠标悬停在 java 导入行中的任何错误上,然后按F2,向下滚动并选择Fix project setup. 将出现一个项目设置修复对话框,然后按确定。

回答by jeet

Right click on the project, and select properties-> chose android-> set Target.

右键单击项目,然后选择属性-> 选择 android-> 设置目标。