当import导入新的程序,难免会有错误爆出,其中一种错误就是程序上有个大大的红叉。但是里面并没有错误。控制台提示错误如下
问题:Error: Unable to open class file R.java No such file or directory
网上找的两个方法。貌似是第二种的成功率较高,第一种低一点。不过不一定,各位试一下吧。
第一种:
The “Build Path” for your Java environment is not setup correctly in Eclipse. To fix this, follow these steps:
1) Open the Preferences Window by clicking “Window -> Preferences”
2) Find the “Java” section and expand it
3) Select “Build Path”
4) Change the value of Source and output folder from Folders to “Project”
5) Click Apply and then “OK”
Your problem should be resolved
第二种:
1.先检查你的代码,代码有误,R.java文件是生成不了的(一般导入的程序是不会有这个问题的) 2. 打开Project ----> Build Automatically那个选项勾上,让工程每次修改完后都会自动编译,这样R.java会是最新的(这时候程序有误,不会生成) 3. Project ---> Clean,点开后,选中你的工程,然后OK,(clean本身就会Reset你的工程设置,并且在之后能自动重新Build一下,如果一次clean还是有问题,那就再clean。一般两次就可以了)。这样三步下来,就能搞定你的问题了。
分享到:
相关推荐
4)....Added "--el_injectjcl", "--el_createjcl", and "--el_createdbg" command-line options for ecc32/emake to inject JEDI/JCL debug info, create .jdbg file, and create .dbg file (Microsoft debug format...
root@android:/dev # cd /sys/class/i2c-adapter/ root@android:/sys/class/i2c-adapter # ll lrwxrwxrwx root root 1970-01-02 08:31 i2c-0 -> ../../devices/platform/sun5i-i2c.0/i2c-0 lrwxrwxrwx root root ...
R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent ...
Added TFlexFileFormat.StreamSupport property (default True), which difines, is it necessary to open file stream or give the file name only. - FIX: If the TCustomProp.Assign method calls when the ...
R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent ...
Overrides the standard java.lang.Object.clone method to return a copy of this cookie. containsHeader(String) - Method in class javax.servlet.http.HttpServletResponseWrapper The default behavior of ...
R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent ...
ICS V9 is in early development and is planned to support Android. There are no current plans for ICS for iOS. Version Control repository: --------------------------- svn://svn.overbyte.be/ics or ...
Q:\a33\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent ...
* File read status: Unable to open source. */ public static final int STATUS_OPEN_ERROR = 2; protected BufferedInputStream in; protected int status; protected int width; // full image width ...
open the d7.ohi file in the Delphi7Help folder and comment out one or more of the index entries by changing the colon in column one to a semi-colon, as shown here: ;Index Open Tools API (IOTA)=d7iota...
$file = fopen("test.txt", "w") or die("Unable to open file!"); fwrite($file, "Hello, world!\n"); fclose($file); ``` 10. **数据库交互**:PHP与MySQL等数据库有着很好的集成能力,可以通过PDO或mysqli...
Unable to open include file ''xxx'' ---------------无法打开被包含的文件xxx Unable to open input file ''xxx'' ----------------无法打开输入文件xxx Undefined label ''xxx'' -------------------没有定义的...