Reputation: 1085
I am setting up google map v2 in Android. I am using the new technique on adding dependency using this link."Android Studio with Google Play Services"
It did nice after synchronization, clean project and rebuild project. However I could not find the MapActivity. What seems to be the problem?
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'
}
Upvotes: 3
Views: 13585
Reputation: 28073
MapActivity
was part of the Google Maps Android v1 API which is now deprecated.
Using the Google Play Services library you will use the Google Maps Android API v2 and then MapActivity
is not available anymore. You need to use the MapFragment
.
You can see an introduction on how to use the MapFragment
in the official documentation.
Upvotes: 9