Skip to content Skip to sidebar Skip to footer

Importing AndroidMapsExtensions Into Android Studio

I have been trying relentlessly to use this library. Everytime I add it, I lose all android.support.v4 and com.google.android.gms.maps cababilities. There is very little documentat

Solution 1:

what conflict you that you are using two dependencies with common function

compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.androidmapsextensions:android-maps-extensions:2.2.0'

when you using it in your application make sure which library imported

example

you try use GoogleMap

you have two options in import

import com.google.android.gms.maps.GoogleMap;
                 **OR**
import com.androidmapsextensions.GoogleMap;
.........
...

private GoogleMap map; 

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

   // options instance from MarkerOptions
   // choose map extensions if you want pass data by setData method
    map.addMarker(options).setData(data);

}

Summary

Organize your imports as your need from google map libraries


Post a Comment for "Importing AndroidMapsExtensions Into Android Studio"