import com.google.android.maps.MapActivity; not accepted in Android Studio
<p>I wanted to begin writing a route tracking activity for the following xml</p>

<pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/mainLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"&gt;

    &lt;ToggleButton
        android:id="@+id/trackingToggleButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:textOff="Start Tracking"
        android:textOn="Stop Tracking"/&gt;
&lt;/FrameLayout&gt;
</code></pre>

<p>and wrote the following in my NeueRouteAufzeichnen.java</p>

<pre><code>package com.noureddine_ouertani.www.wocelli50;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import java.util.Map;
import com.google.android.maps.MapActivity;

public class NeueRouteAufzeichnen extends MapActivity {
}
</code></pre>

<p>maps is red in the following import</p>

<pre><code>import com.google.android.maps.MapActivity;
</code></pre>

<p>and MapActivity as well in </p>

<pre><code>public class NeueRouteAufzeichnen extends MapActivity 
</code></pre>

<p>although Google APIs (API 23) are installed. (I checked in Android SDK Manager)
Am I trying to use something deprecated?
Thanks in advance for any hints or help</p>

<p>PS: This is my build.gradle</p>

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

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.noureddine_ouertani.www.wocelli50"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:support-annotations:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.google.android.gms:play-services:9.0.2'
    compile 'com.google.android.gms:play-services-maps:9.0.2'
    compile 'com.google.android.gms:play-services-location:9.0.2'
    compile 'com.google.android.gms:play-services-base:9.0.2'
}
</code></pre>

<p>and I added the following in my AndroidManifest.xml</p>

<pre><code>&lt;uses-library android:name="com.google.android.maps"/&gt;
</code></pre>

<p>EDIT: I changed my XML (activity_neue_route_aufzeichnen.xml) to this:</p>

<pre><code>&lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/map"
    tools:context=".NeueRouteAufzeichnen"
    android:name="com.google.android.gms.maps.SupportMapFragment" /&gt;
</code></pre>

<p>added this to my AndroidManifest.xml</p>

<pre><code>        &lt;meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" /&gt;
</code></pre>

<p>after deleting this from it</p>

<pre><code> &lt;uses-library android:name="com.google.android.maps"/&gt;
</code></pre>

<p>and took the following class as a basis to build on when implementing my route tracking logic. </p>

<pre><code>package com.noureddine_ouertani.www.wocelli50;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;


    public class NeueRouteAufzeichnen extends FragmentActivity implements OnMapReadyCallback {
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_neue_route_aufzeichnen);
            SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                    .findFragmentById(R.id.map);
            mapFragment.getMapAsync(this);
        }

        @Override
        public void onMapReady(GoogleMap map) {
            // Add a marker in Sydney, Australia, and move the camera.
            LatLng sydney = new LatLng(-34, 151);
            map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
            map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
        }
    }
</code></pre>

<p>I already tested this new activity that uses Google maps on my smartphone and it works. Now I can focus on tracking routes. I´ll publish my route tracking code here as soon as it works to apologize for this question.  :)</p>

<p>PS: I had already added the map key I got from Google to my strings.xml in the values folder. Thanks to all of you for your answers. 
Lesson of the day: MapActivity is out! FragmentActivity is in!</p>

<p>EDIT2: This thread is not a duplicate anymore after EDIT from my point of view because I explained how to integrate your first Google Maps activity in your Android project through describing what I did. Furthermore I´ll post my route tracking logic here.</p>