i am trying to display a random string each time a button is pressed from a set of strings defined in strings.xml . this is an example of the strings ID\'s
&
Why do you need this?
R.string.q0
Assuming getString(RandomQ)
is a valid statement, I would think
int RandomQ = rgenerator.nextInt(5) + 1;
would work just fine.
Also, as a side note: A lot of times those autofixes in your IDE are unreliable and unsafe to use. Unless you know why it's telling you to do something, don't do it.