title: Fragment$InstantiationException
body: <p>I have looked through questions for the same error, but I am implementing all the solutions given in the answers, but I am getting the following error in my logcat:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.overview.LoginActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.test.base.BaseActivity$ProgressDialogFragment: make sure class name exists, is public, and has an empty constructor that is public
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
      at android.app.ActivityThread.access$700(ActivityThread.java:143)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:137)
      at android.app.ActivityThread.main(ActivityThread.java:4950)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:511)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
      at dalvik.system.NativeStart.main(Native Method)
  Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.mint.test.base.BaseActivity$ProgressDialogFragment: make sure class name exists, is public, and has an empty constructor that is public
      at android.support.v4.app.Fragment.instantiate(Fragment.java:399)
      at android.support.v4.app.FragmentState.instantiate(Fragment.java:96)
      at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1726)
      at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:198)
      at com.mint.test.base.BaseActivity.onCreate(BaseActivity.java:88)
      at com.mint.test.base.BaseActivity.onCreate(BaseActivity.java:84)
      at com.test.base.FlipperActivity.onCreate(FlipperActivity.java:56)
      at com.test.overview.LoginActivity.onCreate(LoginActivity.java:99)
      at android.app.Activity.performCreate(Activity.java:5179)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
      ... 11 more
  Caused by: java.lang.IllegalAccessException: access to constructor not allowed
      at java.lang.Class.newInstanceImpl(Native Method)
      at java.lang.Class.newInstance(Class.java:1319)
      at android.support.v4.app.Fragment.instantiate(Fragment.java:384)
      ... 21 more
  </code></pre>
  
  <p>In my code I have the following:</p>
  
  <pre><code>@SuppressLint({ "ValidFragment", "UseSparseArrays" })
  public abstract class BaseActivity extends FragmentActivity {
  
  //The class is static and public
  public static class ProgressDialogFragment extends DialogFragment {
  
      public ProgressDialogFragment() {} //Empty Constructor
  
   }
  }
  </code></pre>
  
  <p>Can someone please help me identify what the problem is?</p>
  
  <p>Thanks.</p>