I am having a strange problem using findViewById(id). It comes back with resource not found even though the resource is definitely there. It is a textview in a layout next t
Just to clarify Terra Caines answer since I saw it happening a lot to people;
TextView, and other text components, have 2 setText() functions with 1 parameter.
One of them is with a String and one with int. The int is obviously for a string Resource such as R.string.myString - which, to those who didnt know, R.exm always is represented as int. The string is for putting a string there.
So for example I want to put int x = 1; in a textView. Doing mTextView.setText(x);
will cause the textView to use the resource function and since there is probably no resource with the id 1 it will throw the exception Resource not found.
If You want to put an int or any number in the setText() Function make sure to convert it to String (x+"") or (x.toString()) would do the trick for you.
Hope it saved some time to people.