main cannot be resolved or is not a field
2012-02-04 11:08
309 查看
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;这条语句就可以了。
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;这条语句就可以了。
相关文章推荐
- 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
- main cannot be resolved or is not a field
- "activity_main 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,异常语句:setContentView(R.layout.main);
- 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”错误
- main 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
- main cannot be resolved or is not a field
- 7.Error提示: main 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”解决方案
- Android Error:main cannot be resolved or is not a field