I have tried this:
int[] trivias = { R.string.trivia1, R.string.trivia2, R.string.trivia3, R.string.trivia4, R.string.trivia5, R.string.trivi
You are not pass int trivias:-
tv.setText(trivias[ran.nextInt(trivias.length)]);
You just forgot to trivias[]