I have tried this:
int[] trivias = { R.string.trivia1, R.string.trivia2, R.string.trivia3, R.string.trivia4, R.string.trivia5, R.string.trivi
this.. may be..
tv.setText(trivias[ran.nextInt(trivias.length)]);
What you are doing right now is searching for resource with id, thats generated by ran.nextInt()
You are not pass int trivias:-
You just forgot to trivias[]