Please help? Can't resolve error in Andriod studio (extreme begginer) : I have been trying to follow a tutorial video on Youtube. When I try to look at it in the Emulator as he does in his video the following error appears.

    Error:(22, 48) error: ';' expected
    Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.

I have done a quick google search and people suggest to check the jdk file location. I have done this which hasn't helped. This is my jdk location.

    C:\Program Files\Java\jdk1.8.0_121

This is the small piece of code I copied from the tutorial.

    package shmaves.myapplication;

    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.widget.RelativeLayout;
    import android.widget.Button;
    import android.graphics.Color;

    public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //layout
        RelativeLayout shmavesLayout = new RelativeLayout(this);
        shmavesLayout.setBackgroundColor(Color.GREEN);

        //Button
        Button redButton = new Button (this);
        redButton.setText ("click me");
        redButton.setBackgroundColor(Color.RED)


        //Add widget to layout (button is now a child of layout
        shmavesLayout.addView(redButton);

        //Set this activities content/display to this view
        setContentView(shmavesLayout);

    }
}


Can anyone shed some light or see where I have gone wrong? As stated in the title I am new to all this so please be thorough with any explanation and assume I don't know any "lingo".

Thanks in advance.



