Problem with


Totally new to programming, so please explain this to me like I’m a 3 year old, haha.

I keep on having problems in the folder. I keep on getting errors on the button variable name (don’t know if I described it correct here).

Here is the code I have:

	mPreviewButton = (Button)findViewById(;
	mPreviewButton.setOnClickListener(new View.OnClickListener() {
		public void onClick(View v){
			 mCurrentIndex = (mCurrentIndex == 0) ? mQuestionBank.length-1 : mCurrentIndex -1;

I can’t get rid of the error on this line: mPreviewButton = (Button)findViewById(;

The error message says that there are multiple markers at this line and then lists of 5 syntax errors. However, the syntax seems to be correct. I hope, haha.
I don’t know what other code this line may be interrelated with or how to fix the error. It’s the only thing that’s keeping me from testing the preview button, otherwise I think it should work. Any suggestion or recommendations would be awesome. Thank you for your help.


Nevermind, solved it. It was outside of the onCreate bracket.


Glad to see you fixed your problem!