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开发eclipseit |
分类: Android学习笔记 |
R.layout.main总是在layout上有错误提示波浪线。
解决方法:
(1) 删除"import android.R;".
(2) 勾选上Eclipse中的"Project->Build Automatically";
原因是:
添加文件,比如xml文件或者资源文件时,系统自动添加了import android.R;android.R是系统提供的资源,R是应用程序的资源。删除"import android.R"之后工程就是从/res文件夹下自动生成的资源文件里去解析了,否则它会从Android的资源类里去找。
Android Error:main cannot be resolved or is not a field 问题解决方法相关推荐
- main cannot be resolved or is not a field
Eclipse Android 开发: Link all references for a local rename (does not change references in other ...
- 【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}. ...
- Android 11.0 NetworkMonitor导致的wifi连接后显示x问题解决方法
Android为了对网络状态进行检测,采用了一种叫做captive detection的方式进行网络状态检测.其实说起来很简单,每当连接到一个网络,比如移动数据网络或者WIFI的时候,Android的 ...
- Troubleshoot: R.Layout.Main cannot be resolved
问题: 下面代码中的第12行出错:R.layout.main cannot be resolved. 1 package com.Tealc.DaysBetween; 2 3 import andro ...
- 443 ERROR [main] client.ConnectionManager$HConnectionImplementation: Can‘t get connection to ZooKeep
HBase报错 443 ERROR [main] client.ConnectionManager$HConnectionImplementation: Can't get connection to ...
- android.provider.documentscontract cannot be resolved.
今天做一个例子的时候报错: The import android.provider.DocumentsContract cannot be resolved 解决方法: SDK Manager安装Ap ...
- android error: undefined reference to 的错误分析
今天,简单讲讲android error: undefined reference to 的错误分析. 昨天,做jni,连接so库时,android studio出现了这个问题.当时不知道是什么 ...
- Android Error:Could not find lottie.jar
Android Error:Could not find lottie.jar 今天遇到了一个及其头疼的问题 同事的工程导到我的电脑里却报错,错误是找不到jcenter仓库里的lottie.jar包 ...
- 【工程项目经验】Compile Android Error fatal error opening dependency file No such file or directory
Compile Android Error fatal error opening dependency file No such file or directory 参考网址:https://for ...
最新文章
- 索引是建的越多越好吗?
- 基于caffe的度量学习实现(Siamese network Triplet network)
- vector,数组,动态数组效率测试
- 如何更新 Exchange2003 SP2 中的智能邮件筛选器版本
- 在Sql2005中,向表中插入数据时遇到uniqueidentifier列,如何插入数据?
- eclipse项目中的.settings .project .classpath 个人见解
- 使用BlazeDS实现Java和Flex通信之hello world
- 过桥问题——图论解法
- Confluent官博:Kafka最牛队列,性能15倍于RabbitMQ!
- linux系统建立文件系统,linux文件系统的建立
- matlab 投票法_张量投票算法及其使用并分析.pdf
- 华为云自研PB级分布式时序数据库揭秘第一期:初识GaussDB(for Influx)
- 关于Viual Studio 改变编辑器背景背景及背景图片(转)
- JIRA OutOfMemoryErrors
- IE打开xml文件弹出下载对话框
- 循序渐进 OSPF的详细剖析(二)
- 解决仙剑奇侠传“应用程序无法正常启动(0xc000000d)”的问题【转载】
- 计算n阶行列式的C语言实现
- 利用Map,完成下面的功能: 从命令行读入一个字符串,表示一个年份,输出该年的世界杯冠军是哪支球队。如果该年没有举办世界杯,则输出:没有举办世界杯。
- 国外近年智慧出行项目清单
热门文章
- Meta 用算法“随机”解雇 60 人;印度的“网络霸凌”最严重;越南要求外国公司数据存储本地化| 每日大事件...
- python爬虫点触验证码的识别思路(图片版)
- ES 中时间日期类型 “yyyy-MM-dd HH:mm:ss” 的完全避坑指南
- poi2011 切题记
- 全国省市县三级级联SQL数据库内容
- 如何用Python检验线性回归的假设是否满足
- Lua Busted 单元测试简介(Windows 环境)
- 对于LSB的理解(位的LSB、模数转换的LSB)
- 学习Java软件编程哪个机构好
- 医学图像处理涉及到的窗宽窗位 1