mShowAnswers.setText( marksObtained );
This line contains the bug. As you are setting text into the textview(mShowAnswers) and the marksObtained is integer value, what is happening is Android is taking this marksObtained integer value as @StringRes and is trying to get matching String Value from Strings.xml which is not found and hence the exception is shown.
Please dont pass integer value in the setText until you are passing value from Strings.xml using R.string.
To solve please use:
mShowAnswers.setText( String.valueOf(marksObtained));
solved having real trouble in this app ; [duplicate]