problem with import com.google.android.gms

1

I want to use the Google Maps API but I can not import the following, because it marks everything I want to import as unknown:

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;

Look for information and that is why I should have installed Google Play Services but I already have it downloaded, what can I do?

    
asked by FrEqDe 12.04.2017 в 03:43
source

1 answer

1

Simply add the dependency in your build.gradle:

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

    dependencies {
        compile 'com.google.android.gms:play-services:10.2.1'
    }

By having the dependency configured, it will download it.

In the documentation you can see how to add it or add a different Google Play services API according to your requirements.

link

    
answered by 12.04.2017 / 04:26
source