无法在 Eclipse 中构建 Java 项目:资源的父级标记为“只读”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19771812/
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
Cannnot build java project in Eclipse: Parent of resource is marked 'read-only'
提问by Adam_G
I am trying to run a java project in Eclipse Kepler. The product runs fine on another machine, and I used git clone
and Import
to load the project on my current machine.
我正在尝试在 Eclipse Kepler 中运行一个 java 项目。该产品在另一台机器上运行良好,我使用git clone
并Import
在我当前的机器上加载项目。
However, upon loading the project, I received the error:
The project was not built due to "Parent of resource: /Users/adam/.../mockup/bin is marked as read-only.". Fix the problem, then try refreshing this project and building it since it may be inconsistent mockup Unknown Java Problem
但是,在加载项目时,我收到错误消息:
由于“资源的父级:/Users/adam/.../mockup/bin 被标记为只读。”,该项目未构建。修复问题,然后尝试刷新此项目并构建它,因为它可能与模型不一致 Unknown Java Problem
How can this issue be resolved?
如何解决这个问题?
采纳答案by Alberto Biasao
Adam, I had the same issue and solved by granting write access to my workspace folder. Some hints of how doing that in linux can be found at: Change read/write access of a folder in Ubuntu Linux
亚当,我遇到了同样的问题,并通过授予对我的工作区文件夹的写访问权限来解决。可以在以下位置找到有关如何在 linux 中执行此操作的一些提示:Change read/write access of a folder of a Ubuntu Linux
回答by Sumit Bisht
if changing existing file permissions is not possible, you can also specify the build folder separately (assuming you are able to write your changes into the .project file).
如果无法更改现有文件权限,您还可以单独指定构建文件夹(假设您能够将更改写入 .project 文件)。
Right-click the project and click properties -> Build path
右键单击项目,然后单击属性-> 构建路径
In there, change the default output folder.
在那里,更改默认输出文件夹。
回答by Afonso Henrique Barrenha
I had the same problem, but I resolved by changing the permissions of the project folders I was importing, not the workspace folder.
我遇到了同样的问题,但我通过更改我正在导入的项目文件夹的权限而不是工作区文件夹的权限来解决。