com.google.android.gms.maps.MapFragment: Cannot resolve symbol "maps"

Add google play services to your project

To make the Google Play services APIs available to your app:

  1. Open the build.gradle file inside your application module directory.

  2. add a new build rule under dependencies for the latest version of play-services

example

apply plugin: 'com.android.application'
...

dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
}
  1. Save the changes and click Sync Project with Gradle Files in the toolbar.

  2. Open your app's manifest file and add the following tag as a child of the <application> element:

    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

This steps will remove the above mentioned error.This particular solution is for android studio only.

for more info visit : http://developer.android.com/google/play-services/setup.html


implementation "com.google.android.gms:play-services-location:15.0.1"
implementation "com.google.android.gms:play-services-places:15.0.1"

Try to add this lines in your manifest file:

Add Following Permission

<permission
        android:name="com.example.mapexdemo.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

And add this lines in also:

 <meta-data
       android:name="com.google.android.maps.v2.API_KEY"
       android:value="AIzaSyDxEkfvGvKy.........your api key" />

  <meta-data android:name="com.google.android.gms.version"
      android:value="@integer/google_play_services_version" />

Do the following to solve the issue:

Install Google Play services

Go File->Project Structure...

Dependencies Tab, Add com.google.android.gms

Finally: click on "+" button

enter image description here

After that, clean and rebuild the project!