项目没有 default.properties 文件!编辑项目属性以设置一个 [英] Project has no default.properties file! Edit the project properties to set one

查看:19
本文介绍了项目没有 default.properties 文件!编辑项目属性以设置一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在配置 MJAndriod 时出现如下错误:

While configuring MJAndriod I have got an error as follows:

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

我有一个 default.properties,我们将它设置为一个完美的目标,并适用于同一工作区中的另一个应用程序.

I have a default.properties which us set to a perfect target and works for another application in the same workspace.

请帮我解决这个问题.

推荐答案

如果项目已经包含一个文件 default.properties 你可以打开那个文件并编辑+保存它(添加一个空间,保存,删除那个空间,保存).这对我有用.

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.

上述讨论的注释:

通过执行上述过程自动生成 R.java.当我去删除它时,它会再次生成.它也不允许我编辑自动生成的.– Compuser7

R.java is getting generated automatically by doing the above described process. When I go and remove it, it gets generated again. Neither is it allowing me to edited the automatically generated one. – Compuser7

关于上面引用的评论,R.java 确实是一个自动生成的类,它包含对属于您的项目的所有资源(在 res 文件夹中)的引用.

With respect to the comment quoted above, R.java is indeed an automatically generated class that contains references to all the resources (in the res folder) that belong with your project.

当 Eclipse 重建时,这个文件会重新生成,因为大多数应用程序(我的意思是 Java 代码)依赖于有一些资源(图像、布局和字符串值)可用的事实.当您通过 Eclipse 删除文件 R.java 时,Eclipse 会将项目中的此更改视为自动重建(请参阅项目下的选项)项目的原因,重新生成 R.java 文件.

When Eclipse rebuilds, this file is regenerated, since most application (I mean Java code) rely on the fact that there are some resources (images, layouts and string values) available. When you remove the file R.java through Eclipse, Eclipse will see this change in the project as a reason to automatically rebuild (see the options under Project) the project, regenerating the R.java file.

所以不要试图删除R.java,因为一旦你重新构建项目,Eclipse就会重新生成它,这将导致耐心匹配;)

So DON'T try to remove R.java, because Eclipse will regenerate it as soon as you rebuild the project, which will result in a match of patience ;)

这篇关于项目没有 default.properties 文件!编辑项目属性以设置一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆