ERROR No package identifier when getting value for resource number

后端 未结 11 2183
醉话见心
醉话见心 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:07

    I got the same error while trying to print integer value : TextView.setText(int value). I resolved this error by converting the integer value to string and the i used TextView.setText(converted string value)

提交回复
热议问题