Beginner Android why is “id” is “Unknown member” with R.id?

后端 未结 5 1032
无人及你
无人及你 2021-01-16 09:54

I\'m sure this is something dead simple as it\'s my first android app with code (the hello world example I did was just assigning a value to a string in XML). My problem is

5条回答
  •  無奈伤痛
    2021-01-16 10:20

    For those using AIDE having issues referencing Id, try deleting the "gen folder" located in the bin folder and recompile. The problem is the R.java class did not create a constructor called Id. So deleting the gen folder containing the R.java class and recompiling solves this issue.

提交回复
热议问题