1

I have a weird problem with Map on Nexus 5 lollipop .I mention that I tested my app on Samsung galaxy s5, Samsung galaxy s4, Alcatel one touch mini, Evertek shine and everything work fine except with nexus. When i access to the Map interface the behavior is:

The Map is displayed, the marker is put correctly and I can even click below and an infowindow is displayed correctly, but after a few seconds the crash occurs (the crash occurs with or without click on the marker) If I go again to the same Map interface,it works properly. In my application I have several Map and behavior is the same in all interfaces with Map, so to understand the problem I’m going to start with the simplest interface. A simple marker with an infowindow java

import java.util.HashMap;
import java.util.List;

import tn.orange.MyApp.application.R;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Typeface;
import android.location.Location;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.directions.route.Route;
import com.directions.route.Routing;
import com.directions.route.RoutingListener;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.InfoWindowAdapter;
import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
import com.google.android.gms.maps.GoogleMap.OnMapLongClickListener;
import com.google.android.gms.maps.GoogleMap.OnMarkerClickListener;
import com.google.android.gms.maps.GoogleMap.OnMarkerDragListener;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.BitmapDescriptor;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.PolylineOptions;

import com.MyAppmag.events.EventsDetails;


public class map extends Activity implements OnMapClickListener, OnMapLongClickListener, OnMarkerDragListener,OnMarkerClickListener,RoutingListener {


    List<HashMap<String, String>> newsList=com.MyAppmag.events.SampleListFragmentEvents.eventList;


    private static final String TAG_title = "title";
    private static final String TAG_lat = "lat";
    private static final String TAG_lng= "lng";
    public static final String TAG_place= "place";
    public static final String TAG_adresse="address";


    // Google Map
    private GoogleMap googleMap;
    HashMap<String, String> ele;
    Bitmap b;
    protected LatLng start;
    protected LatLng end;
    MarkerOptions markerEvent;
    double latitude ;
    double longitude ;


        TextView titleGlobal;
      private Button title_bar_left_menu;

  Typeface  title_font, desc_font; 

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.map_activity);

        try {

            initilizeMap();
            ele=EventsDetails.selected_article;
            title_font = Typeface.createFromAsset(getAssets(), "fonts/title_style.ttf");  
            desc_font = Typeface.createFromAsset(getAssets(), "fonts/desc_style.otf"); 
            titleGlobal=(TextView) findViewById(R.id.title);
            titleGlobal.setText(ele.get(TAG_title));
            titleGlobal.setTypeface(title_font);
            title_bar_left_menu=(Button)findViewById(R.id.title_bar_left_menu);

                    title_bar_left_menu.setOnClickListener(new OnClickListener() {

                        @Override
                        public void onClick(View v) {
                            // TODO Auto-generated method stub
                            finish();
                        }
                    });

            // Changing map type
            googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);


            // Showing / hiding your current location
            googleMap.setMyLocationEnabled(true);

            // Enable / Disable zooming controls
            googleMap.getUiSettings().setZoomControlsEnabled(false);

            // Enable / Disable my location button
            googleMap.getUiSettings().setMyLocationButtonEnabled(true);

            // Enable / Disable Compass icon
            googleMap.getUiSettings().setCompassEnabled(true);

            // Enable / Disable Rotate gesture
            googleMap.getUiSettings().setRotateGesturesEnabled(true);

            // Enable / Disable zooming functionality
            googleMap.getUiSettings().setZoomGesturesEnabled(true);
            googleMap.setOnMapClickListener(this);
            googleMap.setOnMapLongClickListener(this);
            googleMap.setOnMarkerDragListener(this);

            String latString=ele.get(TAG_lat);
            String lngString=ele.get(TAG_lng);
             latitude = Double.parseDouble(latString);
             longitude = Double.parseDouble(lngString);

                double[] randomLocation = createRandLocation(latitude,
                        longitude);

                BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.marker_icon_MyApp);     
                markerEvent = new MarkerOptions().position(
                        new LatLng(randomLocation[0], randomLocation[1]))
                        .title(ele.get(TAG_title))
                        .icon(icon) 
                        .anchor(0.5f, 1);


                Log.e("Random", "> " + randomLocation[0] + ", "
                        + randomLocation[1]);


                googleMap.addMarker(markerEvent);

                // Move the camera to last position with a zoom level
                    CameraPosition cameraPosition = new CameraPosition.Builder()
                            .target(new LatLng(randomLocation[0],
                                    randomLocation[1])).zoom(12).build();

                    googleMap.animateCamera(CameraUpdateFactory
                            .newCameraPosition(cameraPosition));


                    Bitmap bit=EventsDetails.imageBitmapDetail;
                    final Bitmap bitResiz=Bitmap.createScaledBitmap(bit, 80, 80, true);                 
googleMap.setInfoWindowAdapter(new InfoWindowAdapter() {


                        @Override
                        public View getInfoWindow(Marker arg0) {                
                            return null;
                        }           


                        @Override
                        public View getInfoContents(Marker arg0) {
                            if(arg0.getTitle().equals(ele.get(TAG_title)))
                            {
                            View v = getLayoutInflater().inflate(R.layout.info_window_layout, null);

                            TextView title = (TextView) v.findViewById(R.id.title);


                            TextView end = (TextView) v.findViewById(R.id.End);

                            ImageView im=(ImageView)v.findViewById(R.id.imageMarker);
                            //imageLoader.displayImage(ele.get(TAG_image), im);

                            im.setImageBitmap(bitResiz);
//                          im.setImageBitmap(b);
                            // Setting the latitude
                            title.setText(ele.get(TAG_adresse));
                            title.setTypeface(desc_font);

                            end.setText(ele.get(TAG_place));
                            end.setTypeface(title_font);


                            return v;
                            }
                            return null;
                            }

                    });




                    if (googleMap != null) {


                        googleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {

                       @Override
                       public void onMyLocationChange(Location arg0) {
                           MarkerOptions meMarker=new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title("It's Me!");
                           BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.me1);
                           meMarker.icon(icon);
                           googleMap.addMarker(meMarker);  
                           start = new LatLng(latitude,longitude);
                           end = new LatLng(arg0.getLatitude(), arg0.getLongitude());

                           Routing routing = new Routing(Routing.TravelMode.DRIVING);
                           routing.registerListener(map.this);
                           routing.execute(start, end);
                       }
                      });

                        }

        } catch (Exception e) {
            e.printStackTrace();
        }

    }//fin enCreate

     @Override
        public boolean onMarkerClick(final Marker marker) {


            Toast.makeText(getApplicationContext(),
                    "Click marker", Toast.LENGTH_SHORT)
                    .show();
            return true;
        }

    public Bitmap getResizedBitmap(Bitmap image, int bitmapWidth,
            int bitmapHeight) {
    return Bitmap.createScaledBitmap(image, bitmapWidth, bitmapHeight,
                true);
}

    @Override
    protected void onResume() {
        super.onResume();
        initilizeMap();
    }

    /**
     * function to load map If map is not created it will create it for you
     * */
    private void initilizeMap() {
        if (googleMap == null) {
            googleMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();

            // check if map is created successfully or not
            if (googleMap == null) {
                Toast.makeText(getApplicationContext(),
                        "Sorry! unable to create maps", Toast.LENGTH_SHORT)
                        .show();
            }
        }
    }


    private double[] createRandLocation(double latitude, double longitude) {

        return new double[] { latitude + ((Math.random() - 0.5) / 500),
                longitude + ((Math.random() - 0.5) / 500),
                150 + ((Math.random() - 0.5) * 10) };
    }

    @Override
    public void onMapLongClick(LatLng point) {
        // TODO Auto-generated method stub


    }

    @Override
    public void onMapClick(LatLng point) {
        // TODO Auto-generated method stub
        googleMap.animateCamera(CameraUpdateFactory.newLatLng(point));
    }

    @Override
    public void onMarkerDrag(Marker point) {
        // TODO Auto-generated method stub
        Toast.makeText(map.this, "je inkarker fel markeur", Toast.LENGTH_SHORT).show();

    }

    @Override
    public void onMarkerDragEnd(Marker point) {
        // TODO Auto-generated method stub
        Toast.makeText(map.this, point.getPosition().toString(), Toast.LENGTH_SHORT).show();


    }



    @Override
    public void onMarkerDragStart(Marker point) {
        // TODO Auto-generated method stub
        Toast.makeText(map.this, point.getPosition().toString(), Toast.LENGTH_SHORT).show();

    }

     @Override
        public void onRoutingFailure() {
          // The Routing request failed
        }

        @Override
        public void onRoutingStart() {
          // The Routing Request starts
        }

        @Override
        public void onRoutingSuccess(PolylineOptions mPolyOptions, Route route) {
          PolylineOptions polyoptions = new PolylineOptions();
          polyoptions.color(Color.BLUE);
          polyoptions.width(5);
          polyoptions.addAll(mPolyOptions.getPoints());
          googleMap.addPolyline(polyoptions);


                }


}

xml

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:background="@drawable/back"
    >

    <RelativeLayout 
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:layout_gravity="top"
    android:id="@+id/top_relative"
    >
 <Button
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:id="@+id/title_bar_left_menu"
                    android:background="@drawable/droite"
                    android:layout_alignParentLeft="true"
                    android:layout_marginTop="20dp"
                    android:layout_marginLeft="8dp"
                    android:layout_centerVertical="true"

                    />
  <TextView
        android:id="@+id/title"
        android:gravity="top|center_horizontal"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="20dp"
        android:paddingLeft="5dp"
        android:paddingRight="5dp"
        android:layout_toRightOf="@+id/title_bar_left_menu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#FFFFFF"
        android:textSize="16dp"
        android:text="title"
        android:background="@drawable/border_image_ou_nous_trouver" 
        android:layout_centerVertical="true"
        android:ellipsize="end"
        android:singleLine="true"
        android:layout_marginLeft="5dp"
        />

  </RelativeLayout>

    <fragment
        android:id="@+id/map"
        android:name="com.google.android.gms.maps.MapFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/top_relative"
        />

</RelativeLayout>

log

 04-13 11:19:28.301: A/StrictMode(19740): Stack is too large: numViolations=5 policy=#11f front=ava:442)
04-13 11:19:28.301: A/StrictMode(19740):    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:117)
04-13 11:19:28.301: A/StrictMode(19740):    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:149)
04-13 11:19:28.301: A/StrictMode(19740):    at java.util.zip.ZipFile.<init>(ZipFile.java:158)
04-13 11:19:28.301: A/StrictMode(19740):    at java.util.zip.ZipFile.<init>(ZipFile.java:119)
04-13 11:19:28.301: A/StrictMode(19740):    at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:431)
04-13 11:19:28.301: A/StrictMode(19740):    at dalvik.system.DexPathList$Element.findResource(DexPathList.java:445)
04-13 11:19:28.301: A/StrictMode(19740):    at dalvik.system.DexPathList.findResource(DexPathList.java:343)
04-13 11:19:28.301: A/StrictMode(19740):    at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:67)
04-13 11:19:28.301: A/StrictMode(19740):    at java.lang.ClassLoader.getResource(ClassLoader.java:403)
04-13 11:19:28.301: A/StrictMode(19740):    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:442)
04-13 11:19:28.301: A/StrictMode(19740):    at java.lang.Class.getResourceAsStream(Class.java:1368)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.n.a.a.a.a(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.n.a.a.a.a(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.maps.api.android.lib6.b.e.<init>(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.maps.api.android.lib6.b.e.<init>(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.maps.api.android.lib6.b.e.a(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.maps.api.android.lib6.c.dz.a(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.maps.api.android.lib6.c.el.a(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.maps.api.android.lib6.c.ab.a(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.maps.api.android.lib6.c.aa.a(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.maps.internal.x.onTransact(SourceFile:107)
04-13 11:19:28.301: A/StrictMode(19740):    at android.os.Binder.transact(Binder.java:380)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.maps.MapFragment$zza.onCreateView(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.dynamic.zza.zza(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.maps.MapFragment.onCreateView(Unknown Source)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.Fragment.performCreateView(Fragment.java:2053)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:870)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1045)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1147)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2116)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.Activity.onCreateView(Activity.java:5328)
04-13 11:19:28.301: A/StrictMode(19740):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
04-13 11:19:28.301: A/StrictMode(19740):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
04-13 11:19:28.301: A/StrictMode(19740):    at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
04-13 11:19:28.301: A/StrictMode(19740):    at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
04-13 11:19:28.301: A/StrictMode(19740):    at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
04-13 11:19:28.301: A/StrictMode(19740):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:378)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.Activity.setContentView(Activity.java:2145)
04-13 11:19:28.301: A/StrictMode(19740):    at com.kmshack.newsstand.map.onCreate(map.java:76)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.Activity.performCreate(Activity.java:5990)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.ActivityThread.access$800(ActivityThread.java:151)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
04-13 11:19:28.301: A/StrictMode(19740):    at android.os.Handler.dispatchMessage(Handler.java:102)
04-13 11:19:28.301: A/StrictMode(19740):    at android.os.Looper.loop(Looper.java:135)
04-13 11:19:28.301: A/StrictMode(19740):    at android.app.ActivityThread.main(ActivityThread.java:5254)
04-13 11:19:28.301: A/StrictMode(19740):    at java.lang.reflect.Method.invoke(Native Method)
04-13 11:19:28.301: A/StrictMode(19740):    at java.lang.reflect.Method.invoke(Method.java:372)
04-13 11:19:28.301: A/StrictMode(19740):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
04-13 11:19:28.301: A/StrictMode(19740):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
04-13 11:19:28.301: A/StrictMode(19740): # via Binder call with stack:
04-13 11:19:28.301: A/StrictMode(19740): android.os.StrictMode$LogStackTrace
04-13 11:19:28.301: A/StrictMode(19740):    at android.os.StrictMode.readAndHandleBinderCallViolations(StrictMode.java:1717)
04-13 11:19:28.301: A/StrictMode(19740):    at android.os.Parcel.readExceptionCode(Parcel.java:1527)
04-13 11:19:28.301: A/StrictMode(19740):    at android.os.Parcel.readException(Parcel.java:1496)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.common.internal.bo.a(SourceFile:119)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.gms.common.internal.an.a(SourceFile:56)
04-13 11:19:28.301: A/StrictMode(19740):    at com.google.android.location.internal.Go
04-13 11:19:28.324: E/AndroidRuntime(19740): FATAL EXCEPTION: main
04-13 11:19:28.324: E/AndroidRuntime(19740): Process: tn.orange.MyApp.application, PID: 19740
04-13 11:19:28.324: E/AndroidRuntime(19740): java.lang.NullPointerException: Attempt to invoke interface method 'android.os.IBinder com.google.android.gms.b.j.asBinder()' on a null object reference
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.android.gms.b.n.a(SourceFile:48)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.c.h.a(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.c.h.a(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.c.h.b(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.c.j.c(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.c.aj.g(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.c.al.b(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.c.h.a(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.o.av.a(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.o.be.a(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.o.bd.a(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.o.bt.d(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.o.ak.onSingleTapConfirmed(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.i.g.onSingleTapConfirmed(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.google.maps.api.android.lib6.gmm6.i.i.handleMessage(Unknown Source)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at android.os.Handler.dispatchMessage(Handler.java:102)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at android.os.Looper.loop(Looper.java:135)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at android.app.ActivityThread.main(ActivityThread.java:5254)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at java.lang.reflect.Method.invoke(Native Method)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at java.lang.reflect.Method.invoke(Method.java:372)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
04-13 11:19:28.324: E/AndroidRuntime(19740):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
daynasti
  • 49
  • 3

2 Answers2

0

According to this thread there was a bug in the Google Play Services .apk on Lollipop but it should have been fixed by now.

Please make sure that Google play is updated and also verify that no one enabled strictmode on the aforementioned Nexus device.

For more information on strictmode please see here. For information on the functionality itself please see here.

Royi Benyossef
  • 769
  • 5
  • 18
  • 1
    hi royiby, thanks for help , I checked: I am using the latest version of Google Play Services and the strictmode of my Nexus is disable and unfortunately the problem persists. – daynasti Apr 13 '15 at 11:56
  • I see there's also an NPE later on which looks strangely familiar to this thread http://stackoverflow.com/a/27681586/611258 can you try the accepted answer? – Royi Benyossef Apr 13 '15 at 12:06
0

You must use same version of play services

compile 'com.google.android.gms:play-services-maps:7.8.0'
compile 'com.google.android.gms:play-services-location:7.8.0'
compile 'com.google.android.gms:play-services-games:7.8.0'

Using 7.8.0 combined with 9.1.2 etc causes problems.

noni_methadoni
  • 132
  • 1
  • 10