Can't access Activity methods from AppCompatActivity
<p>When I extend AppCompatActivity I cannot use the methods from Activity such as finish() and setTheme() although the Android developer page says I should be able to use them.</p>

<p>Here is my build.gradle:</p>

<pre><code>apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.test"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:support-v4:23.1.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:support-v13:23.1.0'

}
</code></pre>

<p>Here is my code that is giving me errors:</p>

<pre><code>import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;

public class MainActivity extends AppCompatActivity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTheme(R.style.DarkTheme);
        if (Sections.isLocked(this)) {
            Data.showSectionLocked(Data.last);
            finish();
        } else {
            Data.last = this;
        }
    }
}
</code></pre>

<p>Is there any way to fix this?</p>

<p>EDIT: It seems like this is an issue with android.support.v4.app.FragmentActivity.</p>

<p>Upon Ctrl+clicking on AppCompatActivity I noticed that it cannot extend Fragment Activity for some reason:</p>

<p><a href="http://i.stack.imgur.com/brRf5.png" rel="nofollow">Image 1</a></p>

<p><a href="http://i.stack.imgur.com/Bj2i0.png" rel="nofollow">Image 2</a></p>