Eclipse Android 解决Gen文件夹为空的问题时间:2021-07-05 10:04:55通常这个问题的表现为Eclipse报错:R cannot be resolved to a variable 原因是因为Eclipse没有帮我们自动生成固定资源的索引。导致Gen文件夹下为空。 网上的资料大多数都是要清理项目等等。 另外就是原本有Gen文件夹下的内容的源码,通过导入Android Project from Existing Code。清理代码之后就会出现同样的问题。 今天小猪找到了问题的根源:即Android ADK的问题 引用: Hope you know Android studio has gradle building tool. Same as in eclipse they have given new component in the Tools folder called Android SDK Build-tools that needs to be installed. Open the Android SDK Manager, select the newly added build tools, install it, restart the SDK Manager after the update. 选择安装好adk后重启eclipse后再看看呢?