注:R文件是开发环境根据每一份xml文件自动生成的,所以任何一份xml文件出现错误都是无法生成R文件的。
clean一下过程之后,发现R文件不见了,一个字:急
查看xml文件是不是出现错:
我类个去,十几个xml文件,怎么找?!
其实在我们clean过程的时候,console会自动打印出现的错误信息,包括位置。
举个栗子: xml:30: error: Error: No resource found that matches the given name (at 'android:textColor' with value '@color/white').
找到改正即可。当然别忘了在自动构建过程选中(project ---> build auto..)