Android的Java类不能识别R档 [英] The android java class cannot recognize the R file

查看:111
本文介绍了Android的Java类不能识别R档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对R.java从两种布局文件和我检查它在那里的R.java(写在上面)。但奇怪的Java类不能识别的布局,并一直在说,布局不能得到解决。我已经运行该项目,但它一直在说,我的项目包含错误。这是某种形式的错误?

I had two layout files on R.java and I checked it was there on R.java(written on it). But strangely the java class cannot recognize the layout and keep saying that the layout cannot be resolved. I Have Run the project but it keep saying that my project contains error. Is this some kind of bugs?

推荐答案

检查您的Java类的进口部分。有时不正确的Eclipse进口,而不是一个在您的项目中生成 android.R 类。

Check the import section of your java class. Sometimes Eclipse incorrectly imports android.R class instead of one generated in your project.

这篇关于Android的Java类不能识别R档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆