Error inflating class - NestedScrollView - class not found
<p>Running Android Studio 2.1.2, Windows 7.</p>

<p>I replaced a ScrollView with a NestedScrollView and now I'm getting </p>

<blockquote>
  <p>android.view.InflateException: Binary XML file line #2: Error
  inflating class NestedScrollView</p>
  
  <p>java.lang.ClassNotFoundException: Didn't find class
  "android.view.NestedScrollView" on path:
  /data/app/com.assemblyguide.remote-48.apk</p>
</blockquote>

<p>... when I call SetContentView() on that XML file.  I did not get it when I had just a ScrollView.</p>

<p>I've tried cleaning, and invalidating the cache and rebuilding.  The XML looks like this . . . </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:orientation="vertical" &gt;

    &lt;!-- This linear layout is because the scrollview can have only 1 direct child --&gt;
    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical" &gt;

        &lt;!-- Relative layout for Workorder --&gt;
        &lt;RelativeLayout
            android:id="@+id/rellayWorkorder"
            android:background="#383838"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dp"
            android:layout_marginBottom="2dp"&gt;
            &lt;TextView
                android:id="@+id/workorderlabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="Work Order:"/&gt;

            &lt;TextView
                android:id="@+id/workorderContent"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_margin="2dp"
                android:gravity="right"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="---workorder---"/&gt;
        &lt;/RelativeLayout&gt;


        &lt;!-- Relative layout for Required Time
   &lt;FrameLayout
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:layout_gravity="center_horizontal"&gt;&lt;/FrameLayout&gt; --&gt;

        &lt;RelativeLayout
            android:id="@+id/rellayRequiredTime"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dp"
            android:layout_marginBottom="2dp"&gt;
            &lt;TextView
                android:id="@+id/requiredTimelabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="Required Time:"/&gt;

            &lt;TextView
                android:id="@+id/requiredTimeContent"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_margin="2dp"
                android:gravity="right"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="--- 00 minutes ---"/&gt;
        &lt;/RelativeLayout&gt;

        &lt;!-- Relative layout for Time remaining --&gt;
        &lt;RelativeLayout
            android:id="@+id/rellayTimeRemaining"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="30dp"
            android:layout_marginBottom="2dp"&gt;
            &lt;TextView
                android:id="@+id/timeremaininglabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="Time Remaining:"/&gt;

            &lt;TextView
                android:id="@+id/tviewtimeremainingContent"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_margin="2dp"
                android:gravity="right"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="--- 0:00:00---"/&gt;
        &lt;/RelativeLayout&gt;

        &lt;!--  Linear layout for Record Start / Record End buttons --&gt;
        &lt;LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"  &gt;
            &lt;Button
                android:id="@+id/debulkrecordStart"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginRight="4dp"
                android:gravity="center"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:onClick="OnSetRecordStartTimeClick"
                android:text="Record Start"/&gt;
            &lt;Button
                android:id="@+id/debulkrecordEnd"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginRight="4dp"
                android:gravity="center"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:onClick="OnSetRecordEndTimeClick"
                android:text="Record End"/&gt;
        &lt;/LinearLayout&gt;

        &lt;!-- Relative layout for Vacuum level --&gt;
        &lt;RelativeLayout
            android:id="@+id/rellayvacuumlevel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="2dp"&gt;
            &lt;TextView
                android:id="@+id/vaclabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:text="Vacuum Level (inches Hg):"/&gt;
            &lt;EditText
                android:id="@+id/vacleveledit"
                android:layout_width="120dp"
                android:layout_height="wrap_content"
                android:layout_alignParentRight = "true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:inputType="text|textCapCharacters"
                android:text="vac level"
                android:layout_marginRight="2dp"
                android:layout_marginTop="2dp"
                android:layout_marginBottom="2dp"/&gt;
        &lt;/RelativeLayout&gt;

        &lt;!-- Relative layout for Vac Gauge Equipment # --&gt;
        &lt;RelativeLayout
            android:id="@+id/rlayvacuumGauge"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="2dp"&gt;
            &lt;TextView
                android:id="@+id/vacgaugelabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:text="Vac Gauge Equipment #:"/&gt;
            &lt;EditText
                android:id="@+id/vacgaugeedit"
                android:layout_width="120dp"
                android:layout_height="wrap_content"
                android:layout_alignParentRight = "true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:inputType="text|textCapCharacters"
                android:text="equip. #"/&gt;
        &lt;/RelativeLayout&gt;



        &lt;!-- Relative layout for Calibration Due date --&gt;
        &lt;RelativeLayout
            android:id="@+id/rlaycalibdue"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="2dp"&gt;
            &lt;TextView
                android:id="@+id/calibduelabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:text="Calibration Due Date:"/&gt;
            &lt;EditText
                android:id="@+id/calibdueedit"
                android:layout_width="120dp"
                android:layout_height="wrap_content"
                android:layout_alignParentRight = "true"
                android:layout_margin="2dp"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:inputType="text|textCapCharacters"
                android:text="mm/dd/yyyy"/&gt;
        &lt;/RelativeLayout&gt;


        &lt;CalendarView
            android:id="@+id/debulkcalendar"
            android:layout_width="300dp"
            android:layout_height="250dp"
            android:minDate="01/01/2016"
            android:maxDate="11/30/2016"
            /&gt;


        &lt;!--  this linear layout is for the debulk override and done buttons  --&gt;
        &lt;LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"  &gt;
            &lt;Button
                android:id="@+id/debulkOverride"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginRight="4dp"
                android:onClick="OnResetClick"
                android:gravity="center"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="Override"/&gt;
            &lt;Button
                android:id="@+id/debulkDone"
                android:layout_width="150dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginRight="2dp"
                android:onClick="onDoneBtnClick"
                android:gravity="center"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:text="Done"/&gt;
        &lt;/LinearLayout&gt;

    &lt;/LinearLayout&gt;

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

<p>What does this error mean and how do I fix it?</p>