title: java.lang.IllegalStateException: Could not construct instance of helper class class
body: <p>I used <code>**ormlite greendao**</code> for my Android application, everything works well until my android phone upgrade to Android 6.0 (Marshmallow) these days.</p>
  
  <p>The problem happens at this line in my code:</p>
  
  <pre><code>  private DatabaseHelper getHelper() {
          if (mHelper == null)
              mHelper = OpenHelperManager.getHelper(mContext, DatabaseHelper.class);// Error raise here
          return mHelper;
      }
  </code></pre>
  
  <p>And I catch out this causes the issue: </p>
  
  <blockquote>
    <p>java.lang.IllegalAccessException:
    java.lang.Class is not
    accessible from
    java.lang.Class</p>
  </blockquote>
  
  <p>I have researched on the internet but couldn't figure out.
  <strong>It only happens in Android 6.</strong></p>
  
  <p><strong>Update</strong></p>
  
  <p>Cause: </p>
  
  <pre><code>java.lang.IllegalAccessException: java.lang.Class&lt;com.mypackage.DatabaseHelper&gt; is not accessible from java.lang.Class&lt;com.j256.ormlite.android.apptools.OpenHelperManager&gt;
  </code></pre>