找不到MapActivity.Android Studio 0.5.1

The*_*One 2 google-maps google-play-services android-studio android-gradle-plugin

我在Android中设置谷歌地图v2.我使用这个链接添加依赖项的新技术." 带有Google Play服务的Android Studio "

它在同步,清理项目和重建项目之后表现很好.但是我找不到MapActivity.什么似乎是问题?

的build.gradle

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.gms:play-services:4.2.42'
}
Run Code Online (Sandbox Code Playgroud)

rci*_*ati 9

MapActivity是Google Maps Android v1 API的一部分,现已弃用.

使用Google Play服务库,您将使用谷歌地图Android API v2,然后MapActivity不再可用.你需要使用MapFragment.

您可以MapFragment官方文档中看到有关如何使用的介绍.