title: java.lang.NoClassDefFoundError in Fragment
body: <p>I have a next code:</p>
  
  <pre><code>import android.support.v4.app.Fragment; 
  public class HomeFragment extends Fragment{
  ...
  private class TabAdapter extends FragmentPagerAdapter {
          @Override
          public Fragment getItem(@Tab int position) {
              switch (position) {
                  case TAB1:
                      return SearchFragment.newInstance();
                  ...
              }
          }
  }
  ...
  }
  </code></pre>
  
  <p>#</p>
  
  <pre><code>import android.location.Location;
  import android.os.Bundle; 
  import android.widget.AbsListView;
  import android.widget.ListView;
  public class SearchFragment extends Fragment{
  ...
          public static SearchFragment newInstance() {
              SearchFragment fragment = new SearchFragment ();
              return fragment;
          }
          private class C implements ListView.OnScrollListener{
          ...
          }
          @Override
          public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
              super.onViewCreated(view, savedInstanceState);
  
              C c = new C();
          }
  ...
  }
  </code></pre>
  
  <p>When I execute this code in Android 4.3 (&lt;5) I get an error java.lang.NoClassDefFoundError: xx.xx.SearchFragment $C</p>
  
  <p>In Android 5 and 6 all Ok</p>
  
  <p>Logcat output:</p>
  
  <pre><code>FATAL EXCEPTION: main
  java.lang.NoClassDefFoundError: xx.xx.SearchFragment$C
      at xx.xx.HomeFavoriteFragment.&lt;init&gt;(SearchFragment.java:170)
      at xx.xx.SearchFragment.newInstance(SearchFragment.java:43)
      at xx.xx.HomeFragment.&lt;init&gt;(HomeFragment.java:344)
      at xx.xx.HomeFragment.newInstance(HomeFragment.java:72) 
      at com.google.android.gms.common.internal.zzk.zzk(Unknown Source) 
  </code></pre>