user3653474
user3653474

Reputation: 3854

package com.google.android.maps does not exist?

I am new to android studio and was importing one of my project everything is working except it cannot include google maps library and is giving following errors:

error:package com.google.android.maps does not exist 
error:package com.google.android.maps does not exist

I have seen different links of the same type of question but they are not working. Below are some dependencies details:

Project Structure:

enter image description here

build.graddle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "redixbit.restaurant"
        minSdkVersion 14
        targetSdkVersion 21
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:24.2.0'
    compile 'com.android.support:appcompat-v7:24.2.0'
    compile files('libs/easyandroidanimationslibrary-v0.5.jar')
    compile 'com.google.android.gms:play-services:7.3.0'

}

Importing Google maps library in code:

enter image description here

Please help to sort out my issue.

Upvotes: 0

Views: 4753

Answers (5)

Hossein Kurd
Hossein Kurd

Reputation: 4555

According to updates google play services libraries faced some changes in updates

Just add :

implementation "com.google.android.gms:play-services-maps:X..Y.Z"

It works pretty well

Upvotes: 0

Frza
Frza

Reputation: 31

I just ran into this same issue and I needed to include the awareness service:

implementation 'com.google.android.gms:play-services-awareness:16.0.0'

Upvotes: 2

Raj
Raj

Reputation: 3001

Use this:-

compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
compile 'com.google.android.gms:play-services-auth:15.0.1'

Upvotes: 0

Milan Pansuriya
Milan Pansuriya

Reputation: 2559

add this gradle in your dependence

com.google.android.gms:play-services-maps:15.0.1

Upvotes: 0

David G
David G

Reputation: 325

Add into dependencies:

implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'

Upvotes: 0

Related Questions