惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
小众软件
小众软件
美团技术团队
Martin Fowler
Martin Fowler
爱范儿
爱范儿
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
J
Java Code Geeks
B
Blog
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
博客园 - Franky

博客园 - amey

不错的blog 系统内置的图片资源---android.R.drawable android 开发不容错过的网站 Android风格与主题(style and theme) Android中的长度单位详解 startActivity 出错 Android DDMS如何使用? 网上绝无仅有的Log分析教程及例子(转) 如何控制Android不锁屏 Android系统名词解释汇总 - Android讨论区::91手机论坛-91手机娱乐门户 Android开发中的drawable-(hdpi,mdpi,ldpi)和WVGA,HVGA,QVGA的区别以及联系 每一位想有所成就的程序员都必须知道的15件事(转载) MSDN一篇很好的WCF入门教程(转) GetManifestResourceStream的使用 使用Refactor找回被覆盖的代码 第一次制作.hlp文件格式的帮助文档 windows应用程序名要与配置文件命名一致 如何控制静态Form类与普通的Form类之间的切换 [windows编程]error C2664: “MessageBoxW”: 不能将参数 2 从“char *”转换为“LPCWSTR” - amey
main cannot be resolved or is not a field
amey · 2011-05-05 · via 博客园 - amey

Link all references for a local rename (does not change  references in other files)

main cannot be resolved or is not a field

刚遇到这个纠结的问题,代码都没错,R.layout.main总是在layout上游错误提示波浪线。在网上查了好多都是说clean一下工程 然后build工程就可以了,或者fix project properties 但是还是解决不了...

原因可能是添加文件,比如xml文件或者资源文件时,系统自动添加了import android.R;android.R是系统提供的资源,R是应用程序的资源。

这时候只要删除 import android.R;这条语句就可以了。

有关详细说明见下面链接~

http://stackoverflow.com/questions/3296047/android-question-id-cannot-be-resolved-or-is-not-a-field-error

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/typename/archive/2011/02/25/6207815.aspx