前言
【android studio with Kotlin】Layout文件不能被Activity识别的解决方案
文件结构如下,在Second中引用了R.layout.second_main,发现second_main不能被识别(截图中是可以被识别的,因为问题已经解决了)。

问题描述
Activity文件中import了second_main,但是R.layout.second_main是不能被识别的,android studio给出的解决方案就是Create layout,可是却显示已经存在。如此往复,始终不能引入layout。

解决方案
【android studio with Kotlin】Layout文件不能被Activity识别的解决方案
出现问题的gradle版本应该是3.6.x(记不清了)。将其换成3.2.0,并且重新build,就可以正常识别layout。

相关文章:

  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-11-23
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
相关资源
相似解决方案