Cannot find R.layout.activity_main

后端 未结 29 2384
轮回少年
轮回少年 2020-12-01 01:58

I was trying to work out with multiple layout using some online tutorials. The thing is my program was building and compiling correctly as long as there was only one XML fil

29条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 02:40

    My error got removed by importing the line

    import com.example.myapplication.R;
    

    your import line may be different depending upon your project name in which my project name is myapplication

提交回复
热议问题