Q:

Android ошибка при поиске фрагмента

Здравствуйте, недавно начал изучать Android, вылезла такая ошибка:
E/AndroidRuntime: FATAL EXCEPTION: main
              Process: ru.icerock.eventman, PID: 10401
              java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.madechaos.test/ru.madechaos.test.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2521)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
                  at android.app.ActivityThread.access$800(ActivityThread.java:178)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
                  at android.os.Handler.dispatchMessage(Handler.java:111)
                  at android.os.Looper.loop(Looper.java:194)
                  at android.app.ActivityThread.main(ActivityThread.java:5631)
                  at java.lang.reflect.Method.invoke(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:372)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
               Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
                  at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:355)
                  at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:324)
                  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:285)
                  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
                  at ru.icerock.eventman.MainActivity.onCreate(MainActivity.java:16)
                  at android.app.Activity.performCreate(Activity.java:6092)
                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595) 
                  at android.app.ActivityThread.access$800(ActivityThread.java:178) 
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470) 
                  at android.os.Handler.dispatchMessage(Handler.java:111) 
                  at android.os.Looper.loop(Looper.java:194) 
                  at android.app.ActivityThread.main(ActivityThread.java:5631) 
                  at java.lang.reflect.Method.invoke(Native Method) 
                  at java.lang.reflect.Method.invoke(Method.java:372) 
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) 

Код:
<?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:tools="http://schemas.android.com/tools"
 android:id="@+id/activity_main"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 tools:context="ru.madechaos.test.MainActivity">

<com.google.android.gms.maps.MapFragment
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/mapView" />

package ru.madechaos.test;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.OnMapReadyCallback;

public class MainActivity extends AppCompatActivity implements    OnMapReadyCallback {
private GoogleMap gMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    MapFragment mapFragment = ((MapFragment) getFragmentManager().findFragmentById(R.id.mapView));
    mapFragment.getMapAsync(this);
}

@Override
public void onMapReady(GoogleMap googleMap) {
    gMap = googleMap;
    setUpMap();
}

private void setUpMap() {
}
}

A:

Ошибка в файле Manifest.xml. Текущая тема не совместима с активностью из библиотеки поддержки.

Выберите в качестве темы активности android:theme="@style/Theme.AppCompat.Light" и все заработает.

