1

我正在使用 android 2.3.3 ,当我在 eclipse 上清理我的项目时,生成的类 R.java 被删除,我试图通过右键单击并选择 Android 工具来修复项目属性,但它不起作用。
如何重新生成 R.java ?
谢谢

4

4 回答 4

2

在 Eclipse 中:选择 Help > check Updates... 选择 Installed Software 选项卡。单击更新... 如果有可用的 ADT 更新,选择它并单击完成。重新启动 Eclipse。

于 2012-11-05T04:02:24.190 回答
1

If there are any errors in the layout or any resource files there will be no build happening and the R.java file will not be created.

Please solve the errors and then try to clean the project.

于 2012-07-11T10:35:29.797 回答
0

此外,如果您尝试加速 eclipse 并且未选中 Preferences -> General -> Startup and Shutdown -> Android Development Toolkit 检查它并重新启动 eclipse,然后 R 将自动生成

于 2013-08-07T21:54:50.207 回答
0

每次清理项目并重建时,它都会导入

导入.android.R

因此,删除此导入并从 xml 文件中删除所有错误。它会起作用的。

于 2013-02-26T15:31:21.107 回答