Android & Java: what is the odd object called `R`?


Ask by : hhh November 03, 2012 22:34

I am trying to understand Android TCP client and Server communication, illustrated here and errs here. I get all the time "R cannot be resolved to a variable" and it is used like the below. What is this R -object that has methods such as layout and id?

setContentView(R.layout.main);
textDisplay = (TextView) this.findViewById(R.id.text1);

P.s. You can find the codes in GitHub tcpcommclient and tcpcommserver here.

View original question

Answer by : ajacian81November 03, 2012 22:05