ERROR: Unable to open class file G:/李鲁/workspace/TheScorecard/gen/cn/lilu/scorecard/R.java: No such file or directory
说是R.java文件没有找到。原因是把android项目建在了中文文件夹里面,把文件夹名改成拼音或者把workspace放在其他位置就好了。
原来以为只是中文文件夹的问题,谁知道改过以后还是出错,下面是在网上找到的答案:
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!