错误: 找不到符号 符号: 变量 activity_main 位置: 类 layout
2018-08-08 22:15
1271 查看
![这里写图片描述]在组件id没有出错的情况下,导入的R包为android.R,则出现图示错误
修改方法:删除该导入语句,在光标移至R处,按下alt+enter,选择与项目名相同的包。
相关文章推荐
- 错误: 找不到符号 符号: 方法 getResources() 位置: 类型为String的变量 dataSex
- databinding异常Error:(250, 72) 错误: 找不到符号 符号: 方法 getResources() 位置: 类型为String的变量 type
- AS 报错 Error:(303, 27) 错误: 找不到符号 符号: 方法 sin(float) 位置: 类 FloatMath
- android之论setContentView(R.layout.activity_main)位置的重要性
- 错误:找不到符号 类XXX 位置:程序包 com.xxx.xxx
- 一般遇到Error:(14, 9) 错误: 找不到符号 符号: 类 Button 位置: 类 FirstActivity
- Error:(303, 27) 错误: 找不到符号 符号: 方法 sin(float) 位置: 类 FloatMath
- 无符号变量注意错误小点(不会常见,但是见到了估计一时半会也找不到问题)
- Error:(10, 18) 错误: 找不到符号 符号: 类 SystemProperties 位置: 程序包 android.os
- android studio 错误: 找不到符号 符号: 方法 xxx() 位置: 类 xxx
- android studio 错误: 找不到符号 符号: 方法 xxx() 位置: 类 xxx
- (已解决)Error:(31, 29) 错误: 找不到符号 符号: 方法 setLatestEventInfo(MainActivity,String,String,<空值>) 位置: 类型为No
- as 报错 Error:(303, 27) 错误: 找不到符号 符号: 方法 sin(float) 位置: 类 FloatMath
- Error:(633, 16) 错误: 找不到符号 符号: 方法 sqrt(float) 位置: 类 FloatMath
- android studio : Error:(303, 27) 错误: 找不到符号 符号: 方法 sin(float) 位置: 类 FloatMath
- 明明定义的layout.activity_main, full build时却找不到
- 学习笔记-setContentView错误 找不到R.layout.activity
- Android 报错 Error:(303, 27) 错误: 找不到符号 符号: 方法 sin(float) 位置: 类 FloatMath
- AS 报错 Error:(303, 27) 错误: 找不到符号 符号: 方法 sin(float) 位置: 类 FloatMath
- 类似错误: 找不到符号 符号: 方法 getDatabase() 位置: 类 Connector