Android错误之--activity_main cannot be resolved or is not a field
来源:互联网 发布:绿色破解版软件 编辑:程序博客网 时间:2024/05/29 12:32
一般在copy别人的项目中会容易出现本错误,截图如下:
出现本错误的一般有两种情况
第一种情况:导包错误--检查import,找到这个:
删除之,再重新导入含有包名的R文件。
第二种情况:本情况应该更为多见,一般为布局文件中有错误,而无法生存R文件,可以检查一下:
你会发现果真没有生成R文件,这时你需要解决的就是查找布局文件中的错误,改正错误,生成R文件之后,本错误就会消失啦!
喜欢的朋友关注我的微信平台哦!更多好的文章推荐给你!
1 0
- Android错误之--activity_main cannot be resolved or is not a field
- Type activity_main cannot be resolved or is not a field
- activity_main cannot be resolved or is not a field
- activity_main cannot be resolved or is not a field
- activity_main cannot be resolved or is not a field
- activity_main cannot be resolved or is not a field
- activity_main cannot be resolved or is not a field
- 1.创建空白工程时候出现“activity_main cannot be resolved or is not a field”错误
- (Layout) cannot be resolved or is not a field 错误
- main cannot be resolved or is not a field错误
- cannot be resolved or is not a field错误解决
- android项目中出现out cannot be resolved or is not a field错误
- Android中cannot be resolved or is not a field错误的解决办法
- android的菜单错误:add cannot be resolved or is not a field
- Android中cannot be resolved or is not a field错误的解决办法
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- layout cannot be resolved or is not a field
- XML 包含函数fn:contains(string1,string2)的用法
- 最低公共祖先Lowest Common Ancestor of a Binary Tree
- Linux下开机启动sh文件
- C++手稿:函数与参数
- 关于visual c++6.0【未完待续】
- Android错误之--activity_main cannot be resolved or is not a field
- leetcode 139: Word Break
- 数据结构的各种排序算法稳定性比较
- HDU 1164 Eddy's research I(素数)
- zookeeper+kafka配置
- Android SERVICE后台服务进程的守护
- CSS规则的优先级匹配
- new到构造方法
- DH密钥交换算法