android: Unable to start activity
<p>I am getting the following error on this line  <code>setContentView(R.layout.activity_trip);</code></p>

<pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: online.hannuveda.transafe_tx, PID: 2067
                  java.lang.RuntimeException: Unable to start activity ComponentInfo{online.hannuveda.transafe_tx/online.hannuveda.transafe_tx.trip}: android.view.InflateException: Binary XML file line #197: Error inflating class fragment
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2618)
                      at android.app.ActivityThread.access$800(ActivityThread.java:183)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
                      at android.os.Handler.dispatchMessage(Handler.java:111)
                      at android.os.Looper.loop(Looper.java:194)
                      at android.app.ActivityThread.main(ActivityThread.java:5651)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at java.lang.reflect.Method.invoke(Method.java:372)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
                   Caused by: android.view.InflateException: Binary XML file line #197: Error inflating class fragment
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
                      at online.hannuveda.transafe_tx.trip.onCreate(trip.java:219)
                      at android.app.Activity.performCreate(Activity.java:6119)
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2491)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2618) 
                      at android.app.ActivityThread.access$800(ActivityThread.java:183) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475) 
                      at android.os.Handler.dispatchMessage(Handler.java:111) 
                      at android.os.Looper.loop(Looper.java:194) 
                      at android.app.ActivityThread.main(ActivityThread.java:5651) 
                      at java.lang.reflect.Method.invoke(Native Method) 
                      at java.lang.reflect.Method.invoke(Method.java:372) 
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) 
                   Caused by: java.lang.NullPointerException: Attempt to get length of null array
                      at maps.G.a.a(Unknown Source)
                      at maps.V.N.a(Unknown Source)
                      at maps.D.e.a(Unknown Source)
                      at maps.D.p.a(Unknown Source)
                      at maps.ad.ae.a(Unknown Source)
                      at maps.ad.t.a(Unknown Source)
                      at maps.ad.M.a(Unknown Source)
                      at ul.onTransact(:com.google.android.gms.DynamiteModulesB:107)
                      at android.os.Binder.transact(Binder.java:385)
                      at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
                      at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
                      at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
                      at com.google.android.gms.dynamic.zza.zza(Unknown Source)
                      at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
                      at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
                      at android.support.v4.app.Fragment.performCreateView(Fragment.java:2080)
                      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1065)
                      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1268)
                      at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1370)
                      at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2415)
                      at android.support.v4.app.FragmentController.onCreateView(FragmentController.java:120)
                      at android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:376)
                      at android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(BaseFragmentActivityHoneycomb.java:33)
                      at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:75)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
                      at online.hannuveda.transafe_tx.trip.onCreate(trip.java:219) 
                      at android.app.Activity.performCreate(Activity.java:6119) 
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) 
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2491) 
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2618) 
                      at android.app.ActivityThread.access$800(ActivityThread.java:183) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475) 
                      at android.os.Handler.dispatchMessage(Handler.java:111) 
                      at android.os.Looper.loop(Looper.java:194) 
                      at android.app.ActivityThread.main(ActivityThread.java:5651) 
                      at java.lang.reflect.Method.invoke(Native Method) 
                      at java.lang.reflect.Method.invoke(Method.java:372) 
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) 
</code></pre>

<p>Here is the corresponding XML:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="online.hannuveda.transafe_tx.trip"&gt;
    &lt;Button
        android:layout_marginBottom="10dp"
        android:typeface="monospace"
        android:textSize="15sp"
        android:layout_gravity="center"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:text="Show details"
        android:textColor="#ffffff"
        android:background="#ffa500"
        android:onClick="DetailExpander"
        android:id="@+id/Button_Expander" /&gt;
    &lt;com.github.aakira.expandablelayout.ExpandableRelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:ael_duration="500"
        app:ael_expanded="false"
        app:ael_orientation="vertical"
        android:id="@+id/Expander"
        app:ael_interpolator="bounce"&gt;
        &lt;LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"&gt;
            &lt;LinearLayout
                android:layout_margin="5dp"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;
                &lt;TextView
                    android:textStyle="bold"
                    android:typeface="monospace"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Trip ID"
                    android:textSize="10sp"
                    android:textColor="#27bd0d"/&gt;
                &lt;TextView
                    android:gravity="right"
                    android:layout_marginLeft="20dp"
                    android:layout_weight="1"
                    android:textSize="10sp"
                    android:text="Hello"
                    android:typeface="monospace"
                    android:textStyle="bold"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#ffa500"
                    android:id="@+id/TextView_TripID" /&gt;
            &lt;/LinearLayout&gt;
            &lt;LinearLayout
                android:layout_margin="5dp"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;
                &lt;TextView
                    android:textStyle="bold"
                    android:typeface="monospace"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Driver"
                    android:textSize="10sp"
                    android:textColor="#27bd0d"/&gt;
                &lt;TextView
                    android:gravity="right"
                    android:layout_marginLeft="20dp"
                    android:layout_weight="1"
                    android:textSize="10sp"
                    android:text="Hello"
                    android:typeface="monospace"
                    android:textStyle="bold"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#ffa500"
                    android:id="@+id/TextView_Driver" /&gt;
            &lt;/LinearLayout&gt;
            &lt;LinearLayout
                android:layout_margin="5dp"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;
                &lt;TextView
                    android:textStyle="bold"
                    android:typeface="monospace"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Bus no"
                    android:textSize="10sp"
                    android:textColor="#27bd0d"/&gt;
                &lt;TextView
                    android:gravity="right"
                    android:layout_marginLeft="20dp"
                    android:layout_weight="1"
                    android:textSize="10sp"
                    android:text="Hello"
                    android:typeface="monospace"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#ffa500"
                    android:id="@+id/TextView_BusNo" /&gt;
            &lt;/LinearLayout&gt;
            &lt;LinearLayout
                android:layout_margin="5dp"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;
                &lt;TextView
                    android:textStyle="bold"
                    android:typeface="monospace"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Trip Start Time"
                    android:textSize="10sp"
                    android:textColor="#27bd0d"/&gt;
                &lt;TextView
                    android:gravity="right"
                    android:layout_marginLeft="20dp"
                    android:layout_weight="1"
                    android:textSize="10sp"
                    android:text="Hello"
                    android:typeface="monospace"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#ffa500"
                    android:id="@+id/TextView_TripStartTime" /&gt;
            &lt;/LinearLayout&gt;
            &lt;LinearLayout
                android:layout_margin="5dp"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;
                &lt;TextView
                    android:textStyle="bold"
                    android:typeface="monospace"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Sent Data"
                    android:textSize="10sp"
                    android:textColor="#27bd0d"/&gt;
                &lt;TextView
                    android:gravity="right"
                    android:layout_marginLeft="20dp"
                    android:layout_weight="1"
                    android:textSize="10sp"
                    android:text="0"
                    android:typeface="monospace"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#ffa500"
                    android:id="@+id/TextView_SentData" /&gt;
            &lt;/LinearLayout&gt;
            &lt;LinearLayout
                android:layout_margin="5dp"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;
                &lt;TextView
                    android:textStyle="bold"
                    android:typeface="monospace"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Buffered Data"
                    android:textSize="10sp"
                    android:textColor="#27bd0d"/&gt;
                &lt;TextView
                    android:gravity="right"
                    android:layout_marginLeft="20dp"
                    android:layout_weight="1"
                    android:textSize="10sp"
                    android:text="0"
                    android:typeface="monospace"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#ffa500"
                    android:id="@+id/TextView_BufferedData"
                    /&gt;
            &lt;/LinearLayout&gt;
        &lt;/LinearLayout&gt;
    &lt;/com.github.aakira.expandablelayout.ExpandableRelativeLayout&gt;
    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"&gt;
        &lt;fragment
            android:id="@+id/googleMap"
            android:layout_weight="1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            class="com.google.android.gms.maps.SupportMapFragment" /&gt;
    &lt;/LinearLayout&gt;
    &lt;LinearLayout
        android:layout_marginTop="10dp"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"&gt;
        &lt;Button
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:layout_marginBottom="10dp"
            android:typeface="monospace"
            android:textSize="15sp"
            android:layout_weight="1"
            android:layout_gravity="left"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="End"
            android:textColor="#ffffff"
            android:background="#ffa500"
            android:onClick="EndTrip"
            android:id="@+id/Button_EndTrip" /&gt;
        &lt;Button
            android:layout_marginLeft="1dp"
            android:layout_marginRight="10dp"
            android:layout_marginBottom="10dp"
            android:typeface="monospace"
            android:textSize="15sp"
            android:layout_weight="1"
            android:layout_gravity="right"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="Cancel"
            android:textColor="#ffffff"
            android:background="#ffa500"
            android:onClick="CancelTrip"
            android:id="@+id/Button_CancelTrip" /&gt;
    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>I am unsure why is it giving error related to Array. Can anyone please help me out here.</p>