我在setContentView中找不到布局文件,setContentView(R.layout.main)提示无法解析main,
setContentView(com.android.test.R.layout.main),我的包名是com.android.test.不出错,但在模拟器运行的时候出现错误,提示意外停止,请问怎么回事?

 

呵呵 我解决了  你把上面import android.R; 的这句删掉 然后再写代码 R.Layout. 这样去做.重新导入包 搞定.

相关文章:

  • 2021-10-29
  • 2021-03-31
  • 2021-04-01
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2021-04-07
  • 2021-07-26
  • 2022-02-11
  • 2021-07-22
  • 2021-11-26
相关资源
相似解决方案