ERROR No package identifier when getting value for resource number

后端 未结 11 2182
醉话见心
醉话见心 2020-12-03 10:21

Both activities are in the same package

Second activity uses second layout file

setContentView(R.layout.main2);

Errors on this line

11条回答
  •  悲哀的现实
    2020-12-03 11:12

    For me I had to go in the XML file for the button. There I noticed a hard coded string value. I had to remove that, and also I had to use Textview.setText("" + intVar);

提交回复
热议问题