在我的一种方法中,我想将布局切换为辅助布局。但是由于某种原因,setContentView在文件夹中看不到布局。下图显示了这一点:
然后运行代码
setContentView(R.layout.saveg_w_name) //I know this name is correctly spelled and everything since I clicked the createLayout
但是它仍然给出无法解析的符号错误。这是Android Studio的错误还是我做错了?
只需重新启动您的android studio,然后再次检查。
如果仍然不能解决您的问题,请尝试使缓存无效。
单击文件(菜单)->使缓存无效/重新启动