title: Nested Scroll View cannot inflate class
body: <p>This is my xml code,When i run my app the error appears telling me that the NestedScrollView class has an error inflating it</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:id="@+id/codinator_layout"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar_layout"
          android:layout_width="match_parent"
          android:layout_height="250dp"
          android:theme="@style/AppTheme.AppBarOverlay"
          app:layout_anchor="@+id/appbar_layout"
          app:layout_anchorGravity="left|top"&gt;
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/collapsing_toolbar"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
              &lt;ImageView
                  android:id="@+id/imgdetalle"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:background="@drawable/carapp_logo"
                  android:scaleType="centerCrop"
                  app:layout_collapseMode="parallax" /&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="56dp"
                  app:layout_collapseMode="pin"
                  app:popupTheme="@style/AppTheme.AppBarOverlay"
  
                  /&gt;
  
  
          &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.widget.NestedScrollView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="#ffe5e5e5"
          android:nestedScrollingEnabled="true"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  &lt;android.support.v7.widget.CardView
      android:layout_marginLeft="8dp"
      android:layout_marginRight="8dp"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      app:cardUseCompatPadding="true"
      android:layout_marginTop="15dp"
      app:cardCornerRadius="2dp"&gt;
      &lt;LinearLayout
          android:padding="8dp"
  
  
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
  
              android:orientation="horizontal"
              &gt;
  
              &lt;TextView
  
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:text="Referencia"
                  android:textSize="20dp"
                  /&gt;
              &lt;TextView
                  android:layout_marginLeft="10dp"
                  android:id="@+id/detalle_referencia"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                 android:text="asasa3343"/&gt;
              &lt;TextView
  
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="10dp"
                  android:text="Precio"/&gt;
              &lt;TextView
                  android:id="@+id/detalle_precio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="10dp"
                  android:textStyle="bold"
                  android:background="#af370b"
                  android:padding="5dp"
                  android:textColor="@android:color/white"
                  android:text="$500000000"/&gt;
          &lt;/LinearLayout&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal"
  
         &gt;
  
          &lt;TextView
  
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:text="Modelo"
              android:textSize="20dp"
              /&gt;
          &lt;TextView
              android:layout_marginLeft="10dp"
              android:id="@+id/detalle_modelo"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:text="2020"/&gt;
      &lt;/LinearLayout&gt;
          &lt;LinearLayout
              android:id="@+id/lymotor"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              &gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:text="Motor"
                  android:textSize="20dp"
                  /&gt;
              &lt;TextView
                  android:layout_marginLeft="10dp"
                  android:id="@+id/detalle_motor"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:text="120000 km"/&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout
              android:id="@+id/lykilometraje"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:visibility="gone"
              &gt;
  
              &lt;TextView
  
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:text="Kilometraje"
                  android:textSize="20dp"
                  /&gt;
              &lt;TextView
                  android:layout_marginLeft="10dp"
                  android:id="@+id/detalle_kilometraje"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:text="120000 km"/&gt;
          &lt;/LinearLayout&gt;
  
  
  
  
      &lt;/LinearLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;TextView
              android:id="@+id/txt_descripcion"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="Descripcion"
              android:layout_marginTop="130dp"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"/&gt;
  
  
  
  
  
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="end|bottom"
          app:fabSize="mini"
          android:src="@drawable/ic_favorite_border"
          android:layout_margin="16dp" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>This is my class</p>
  
  <pre><code>package com.example.mac.mycarapp.UI;
  
  import android.os.Bundle;
  import android.support.design.widget.AppBarLayout;
  import android.support.design.widget.CollapsingToolbarLayout;
  import android.support.design.widget.CoordinatorLayout;
  import android.support.v7.app.AppCompatActivity;
  import android.support.v7.widget.Toolbar;
  import android.view.Display;
  import android.view.View;
  import android.widget.ImageView;
  import android.widget.LinearLayout;
  import android.widget.TextView;
  
  import com.bumptech.glide.Glide;
  import com.example.mac.mycarapp.Modelos.Automoviles;
  import com.example.mac.mycarapp.R;
  
  import butterknife.BindView;
  import butterknife.ButterKnife;
  
  public class CarroDetalleActivity extends AppCompatActivity {
      @BindView(R.id.detalle_modelo)
      TextView detalleModelo;
      @BindView(R.id.detalle_kilometraje)
      TextView detalleKilometraje;
      @BindView(R.id.detalle_motor)
      TextView detalleMotor;
      @BindView(R.id.lykilometraje)
      LinearLayout lykilometraje;
      @BindView(R.id.detalle_precio)
      TextView detallePrecio;
      @BindView(R.id.txt_descripcion)
      TextView detalle_descripcion_vehiculo;
  
  
      private Automoviles automoviles;
  
      @BindView(R.id.imgdetalle)
      ImageView imgdetalle;
  
      @BindView(R.id.detalle_referencia)
      TextView txt_referencia;
      @BindView(R.id.appbar_layout)
      AppBarLayout appBarLayout;
  
      @BindView(R.id.codinator_layout)
      CoordinatorLayout coordinatorLayout;
  
  
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_carro_detalle);
  
          ButterKnife.bind(this);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  
          automoviles = getIntent().getExtras().getParcelable("ListaVehiculos");
          toolbar.setTitle(automoviles.getMarca());
          detalleModelo.setText(automoviles.getYear() + "");
          if (!automoviles.isNuevo()) {
              lykilometraje.setVisibility(View.VISIBLE);
          }
          detalleKilometraje.setText(automoviles.getKilometraje() + "");
          detalleMotor.setText(automoviles.getMotor() + "");
          txt_referencia.setText(automoviles.getReferencia());
          detalleMotor.setText(automoviles.getMotor()+"");
          detallePrecio.setText("$"+automoviles.getPrecio());
          detalle_descripcion_vehiculo.setText(R.string.descripcion_prueba);
  
          Glide.with(this).load(automoviles.getImagen()).into(imgdetalle);
  
          final Display dwigth = getWindowManager().getDefaultDisplay();
  
          appBarLayout.post(new Runnable() {
              @Override
              public void run() {
                  int heigthPx = dwigth.getWidth() * 1 / 3;
                  setAppbarOffset(heigthPx);
              }
          });
  
      }
  
      private void setAppbarOffset(int heigthPx) {
          CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) appBarLayout.getLayoutParams();
          AppBarLayout.Behavior behavior = (AppBarLayout.Behavior) params.getBehavior();
          behavior.onNestedPreScroll(coordinatorLayout, appBarLayout, null, 0, heigthPx, new int[]{0, 0});
      }
  }
  </code></pre>
  
  <p>i checked this post </p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/37846245/error-inflating-class-nestedscrollview-class-not-found">Error inflating class - NestedScrollView - class not found</a></p>
  </blockquote>
  
  <p>But the suggestions there i followed them.</p>