Android错误之--activity_main cannot be resolved or is not a field
一般在copy别人的项目中会easy出现本错误,截图例如以下:
出现本错误的一般有两种情况
第一种情况:导包错误--检查import,找到这个:
删除之,再又一次导入含有包名的R文件。
另外一种情况:本情况应该更为多见。一般为布局文件里有错误,而无法生存R文件。能够检查一下:
你会发现果真没有生成R文件。这时你须要解决的就是查找布局文件里的错误,改正错误,生成R文件之后,本错误就会消失啦!
喜欢的朋友关注我的微信平台哦!
很多其它好的文章推荐给你!
转载于:https://www.cnblogs.com/llguanli/p/8706574.html
Android错误之--activity_main cannot be resolved or is not a field相关推荐
- Android中cannot be resolved or is not a field错误的解决办法
以下问题可以参考: 1.R cannot be resolved or is not a field 2.id cannot be resolved or is not a field 在写第一程序的 ...
- Android Error:main cannot be resolved or is not a field 问题解决方法
Android Error:main cannot be resolved or is not a field 问题解决方法 (2012-07-25 17:27:07) 转载▼ 标签: android ...
- 【android】id cannot be resolved or is not a field
android开发中遇到id cannot be resolved or is not a field错误,解决方案: 确定引入的R包为 import com.${your app package}. ...
- Eclipse新建Android项目后,出现“The import android.support.v7.app cannot be resolved”
1>在Eclipse中新建Android项目后,出现"The import android.support.v7.app cannot be resolved" 如下图所示: ...
- android 错误记录Attempt to invoke virtual method ‘void android.view.View.setVisibility(int)‘
android 错误记录: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null ...
- Eclipse Android项目 为控件添加了Id,但是在Java代码中提示xxx cannot be resolved or is not a field
在Android开发过程中,常需要在布局文件中为控件添加Id,以便在Java代码中找到这个控件. 但在使用Eclipse进行开发的过程中,常会出现明明已经在Layout XML文件中为组件添加了Id, ...
- android 报错:should pass resolved color instead of id here
android 报错:should pass resolved color instead of id here 如题. 解决方法: 加上getResources() & getColor() ...
- 【Android错误解决方案】解决AndroidStudio在oppo和vivo手机上安装apk失败----终极解决方案
文章目录 [Android错误解决方案]解决AndroidStudio在oppo和vivo手机上安装apk失败---终极解决方案 问题描述 错误描述 解决方案一 解决方案二 总结 [Android错误 ...
- styleable cannot be resolved or is not a field
做圆形头像 的时候使用第三方的导入自己的项目中报错误, 错误:styleable cannot be resolved or is not a field 也就是下图 这样的 原因 呢是自己没有细心去 ...
最新文章
- 对于“网站快照”的认识你停留在哪个阶段?
- 【数字信号处理】序列傅里叶变换 ( 傅里叶变换实例 | 矩形窗函数 | 傅里叶变换 | 傅里叶变换幅频特性 | 傅里叶变换相频特性 )
- 数据库表DML操作不了 可能是被锁了
- 10年Linux老司机吐血整理的命令大全,拿去吧
- 数学学习的心理——关于数学中的挫败的反思及若干启示
- Shell 中各种括号的作用
- 开源飞控爱好者_开源爱好者的10种节日礼物创意
- Python学习二:词典基础详解
- 支持的存储类型有_跟我一起看博途1200系统手册之数据类型的介绍
- C++基础::拾遗琐碎
- process 类 java_Process 执行命令行Java封装类详解
- Atitit ceo之道 艾龙 著 atitit 各分部ceo cao行政经理职责.docx 1.1. “重大执行权”和“日常执行权”两块分离 ,重大事件如大政方针、重大人事任命和重大投资方面
- arm汇编指令集_汇编入门第一篇,小白也能看懂
- 设置javadoc模板
- HTML网页设计制作大作业(div+css)
- 全网最全清理c盘大全
- hp刀片服务器性能分析,IBM刀片服务器与高性能计算-20210723075634.ppt-原创力文档...
- 怎么更改计算机信息,修改电脑oem信息的方法 如何修改oem电脑配置信息
- 有限自动机字符串匹配
- 研大考研:2015考研政治认识论知识点
热门文章
- 【php】windows安装PHP5.5+Apache2.4
- DateGridView的外观美化
- stm32qspi内存映射_stm32 QSPI内存映射模式
- dos命令行设置网络优先级_海康威视二层接入网络交换机DS-3E2326-H 26口_DS-3E2326-H_DS-3E2326-H...
- 修改class文件_VM实战(六) - 通过案例深入学习class文件结构原理
- C++知识点40——运算符的重载概念与分数类实现(中)
- MATLAB修改工作环境
- 软件测试中性能瓶颈是什么,性能测试中如何定位性能瓶颈
- Python之目录结构
- mysql left join的深入探讨