title: Unity - Android 6.0 - Crash with java.lang.IllegalAccessException: java.lang.Class<com.unity3d.player.n$1> is not accessible
body: <p>I have a game developed with Unity and getting crash logs that I can not reproduce on any of my devices as follows:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{fab.gameofwords/com.unity3d.player.UnityPlayerNativeActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.unity3d.player.n$1: make sure class name exists, is public, and has an empty constructor that is public
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
      at android.app.ActivityThread.access$900(ActivityThread.java:150)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:148)
      at android.app.ActivityThread.main(ActivityThread.java:5417)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.unity3d.player.n$1: make sure class name exists, is public, and has an empty constructor that is public
      at android.app.Fragment.instantiate(Fragment.java:628)
      at android.app.FragmentState.instantiate(Fragment.java:106)
      at android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1858)
      at android.app.FragmentController.restoreAllState(FragmentController.java:122)
      at android.app.Activity.onCreate(Activity.java:923)
      at android.app.NativeActivity.onCreate(NativeActivity.java:184)
      at com.unity3d.player.UnityPlayerNativeActivity.onCreate(Unknown Source)
      at android.app.Activity.performCreate(Activity.java:6285)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
      ... 9 more
  Caused by: java.lang.IllegalAccessException: java.lang.Class&lt;com.unity3d.player.n$1&gt; is not accessible from java.lang.Class&lt;android.app.Fragment&gt;
      at java.lang.Class.newInstance(Native Method)
      at android.app.Fragment.instantiate(Fragment.java:613)
      ... 18 more
  </code></pre>
  
  <p>And here is my AndroidManifest.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="fab.gameofwords" android:installLocation="preferExternal" android:theme="@android:style/Theme.NoTitleBar" android:versionCode="1" android:versionName="1.0"&gt;
    &lt;supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" /&gt;
    &lt;application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:debuggable="true"&gt;
      &lt;meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /&gt;
      &lt;meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb577464905719222" /&gt;
      &lt;provider android:name="android.support.v4.content.FileProvider" android:authorities="fab.gameofwords.fileprovider" android:exported="false" android:grantUriPermissions="true"&gt;
        &lt;meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" /&gt;
      &lt;/provider&gt;
      &lt;activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name"&gt;
        &lt;meta-data android:name="unityplayer.UnityActivity" android:value="true" /&gt;
        &lt;meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" /&gt;
        &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.MAIN" /&gt;
          &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /&gt;
      &lt;activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /&gt;
      &lt;activity android:name="com.facebook.LoginActivity" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /&gt;
      &lt;activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" /&gt;
      &lt;activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" /&gt;
      &lt;activity android:name="com.androidnative.AndroidNativeProxy" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar"&gt;
        &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.VIEW" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
          &lt;data android:scheme="oauth" android:host="fab.gameofwords" /&gt;
        &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name="com.outlinegames.unibill.PurchaseActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="portrait" /&gt;
      &lt;!--Parse--&gt;
      &lt;receiver android:name="com.parse.ParsePushBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"&gt;
        &lt;intent-filter&gt;
          &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
          &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
          &lt;category android:name="fab.gameofwords" /&gt;
        &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;service android:name="com.parse.ParsePushService" /&gt;
      &lt;!--End--&gt;
      &lt;!--Google Analytics--&gt;
      &lt;service android:name="com.google.analytics.tracking.android.CampaignTrackingService" /&gt;
      &lt;receiver android:name="com.google.analytics.tracking.android.CampaignTrackingReceiver" android:exported="true"&gt;
        &lt;intent-filter&gt;
          &lt;action android:name="com.android.vending.INSTALL_REFERRER" /&gt;
        &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;!--End--&gt;
      &lt;!--Tune--&gt;
      &lt;receiver android:name="com.tune.TuneTracker" android:exported="true"&gt;
        &lt;intent-filter&gt;
          &lt;action android:name="com.android.vending.INSTALL_REFERRER" /&gt;
        &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;!--End--&gt;
      &lt;activity android:name="com.outlinegames.unibill.PurchaseActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /&gt;
      &lt;activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" /&gt;
      &lt;activity android:name="com.facebook.unity.FBUnityGameRequestActivity" /&gt;
      &lt;activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" /&gt;
      &lt;activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" /&gt;
      &lt;activity android:name="com.facebook.unity.AppInviteDialogActivity" /&gt;
      &lt;provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider577464905719222" android:exported="true" /&gt;
      &lt;activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="@string/app_name" android:theme="@android:style/Theme.Translucent.NoTitleBar" /&gt;
    &lt;/application&gt;
    &lt;!-- Settings for GCM --&gt;
    &lt;permission
      android:name="fab.gameofwords.permission.C2D_MESSAGE"
      android:protectionLevel="signature" /&gt;
    &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
    &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
    &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
    &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
    &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
    &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
    &lt;uses-permission android:name="fab.gameofwords.permission.C2D_MESSAGE" /&gt;
    &lt;uses-permission android:name="com.android.vending.BILLING" /&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Seems that the crash only occurs on <strong>Android 6.0</strong>. 
  What can be wrong here, what am I missing?</p>
  
  <p>Thanks in advance.</p>