getting Error inflating class fragment only in API 23
<p>This has been the biggest headache for me. I've been following the tutorial at 
<a href="https://developers.google.com/maps/documentation/android-api/start?hl=en" rel="nofollow">https://developers.google.com/maps/documentation/android-api/start?hl=en</a></p>

<p>but I always get a </p>

<pre><code>android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class fragment 
</code></pre>

<p>ONLY on api 23. This is the most confusing part. Other APIs over 18 work fine.
I believe I've covered all the basic components,</p>

<p>AndroidManifest.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
</code></pre>

<p></p>

<pre><code>&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="ACCESS_NETWORK_STATE" /&gt;
&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;

&lt;application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme" &gt;


    &lt;meta-data android:name="com.google.android.gms.version"

        android:value="@integer/google_play_services_version" /&gt;
    &lt;meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="@string/google_maps_key" /&gt;

    &lt;activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar" &gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
&lt;/application&gt;
</code></pre>

<p></p>

<p>My google play version is up to date.(8487000)</p>

<p>I've tried placing the map fragment everywhere. Nothing seems to work.</p>

<p>activity_maps.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/maps"
class ="com.google.android.gms.maps.SupportMapFragment" /&gt;
</code></pre>

<p>MapsActivity:</p>

<pre><code>package com.example.michael.myapplication;


import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
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;

public class MapsActivity extends android.support.v4.app.FragmentActivity         implements OnMapReadyCallback {

private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_maps);
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
            .findFragmentById(R.id.maps);
    mapFragment.getMapAsync(this);
}

@Override
public void onMapReady(GoogleMap googleMap) {
    mMap = googleMap;

    // Add a marker in Sydney, Australia, and move the camera.
    LatLng sydney = new LatLng(-34, 151);
    mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}
</code></pre>