今天我导入一个游戏demo的工程,发现项目名称上有红叉,控制台抛出错误报告
- Java code
[2011-01-13 13:47:42 - DrifBall] ERROR: Unable to open class file G:\Android2.0游戏开发实践宝典源代码\源代码\第14章\DrifBall\gen\wyf\wpf\R.java: Permission denied
上网搜了一下“Permission denied”,说要更改项目的只读属性,结果我没找到,这个问题到底是怎么回事啊?
------解决方案--------------------
删除gen,重新编译
------解决方案--------------------
最好不用中文的目录。
------解决方案--------------------
------解决方案--------------------
Help with “Error: Unable to open class file R.java” when building an Android App for the first time in Eclipse
This is just a really, quick and dirty post to help resolve this issue.
Problem:
You’ve just installed Eclipse (5.2.x at the time of this writing), and attempted to create your first Android Application. When clicking create, you see an error similar to this:
Error: Unable to open class file R.java
Solution:
The “Build Path” for your Java environment is not setup correctly in Eclipse. To fix this, follow these steps:
- Java code
1) Open the Preferences Window by clicking Window -> Preferences2) Find the Java section and expand it3) Select Build Path4) Change the value of Source and output folder from Folders to Project5) Click Apply and then OK
------解决方案--------------------
把源码在copy一份 在重新做导入~~~不要在人家的里面改~
------解决方案--------------------
呼呼哈哈,写书的是我室友,回去帮你问问哈哈哈
------解决方案--------------------
你右键点击只读文件->属性->去掉只读选项的钩就不会再提示了