Search Unity

Crash reports caused by android.app.Fragment$InstantiationException

Discussion in 'Android' started by Tx, May 24, 2017.

  1. luffyczy

    luffyczy

    Joined:
    Oct 10, 2014
    Posts:
    4
    java.lang.RuntimeException:

    at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2572)

    at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2654)

    at android.app.ActivityThread.-wrap11 (ActivityThread.java)

    at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1488)

    at android.os.Handler.dispatchMessage (Handler.java:111)

    at android.os.Looper.loop (Looper.java:207)

    at android.app.ActivityThread.main (ActivityThread.java:5728)

    at java.lang.reflect.Method.invoke (Native Method)

    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:789)

    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:679)
    Caused by: android.app.Fragment$InstantiationException:

    at android.app.Fragment.instantiate (Fragment.java:635)

    at android.app.FragmentState.instantiate (Fragment.java:111)

    at android.app.FragmentManagerImpl.restoreAllState (FragmentManager.java:1885)

    at android.app.FragmentController.restoreAllState (FragmentController.java:122)

    at android.app.Activity.onCreate (Activity.java:920)

    at com.unity3d.player.UnityPlayerActivity.onCreate (Unknown Source)

    at android.app.Activity.performCreate (Activity.java:6309)

    at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1113)

    at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2519)
    Caused by: java.lang.InstantiationException:

    at java.lang.Class.newInstance (Native Method)

    at android.app.Fragment.instantiate (Fragment.java:624)
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    The issue was fixed a long time ago, please update your Unity version. If you can still reproduce this with the latest version, please submit a bug report.
     
  3. mcolombo

    mcolombo

    Joined:
    Sep 27, 2017
    Posts:
    16
    Hi ,

    I'm facing the same exception in unity 2022.3.14f1.

    The error is:

    Caused by android.app.Fragment$InstantiationException: Unable to instantiate fragment com.unity3d.player.a.d: could not find Fragment constructor
    at android.app.Fragment.instantiate (Fragment.java:562)
    at android.app.FragmentContainer.instantiate (FragmentContainer.java:53)
    at android.app.FragmentState.instantiate (FragmentState.java:77)
    at android.app.FragmentManagerImpl.restoreAllState (FragmentManager.java:2867)
    at android.app.FragmentController.restoreAllState (FragmentController.java:143)
    at android.app.Activity.onCreate (Activity.java:1654)
    at com.unity3d.player.UnityPlayerActivity.onCreate (UnityPlayerActivity.java:35)
    at com.google.firebase.MessagingUnityPlayerActivity.onCreate (MessagingUnityPlayerActivity.java:91)
    at android.app.Activity.performCreate (Activity.java:8232)
    at android.app.Activity.performCreate (Activity.java:8212)
    at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1331)
    at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3724)


    I'm seeing the happening to other users here:
    https://forum.unity.com/threads/game-is-crashing-after-updating-to-unity-2022-2-7f1-android.1407259/

    What can I do?

    Thanks
     
  4. Mese

    Mese

    Joined:
    Dec 13, 2015
    Posts:
    41
    We are seeing a similar problemn. Not sure if its 100% this, but here is the trace.
    What we can say is that it happens on Android 13 Users

    Unity 2022.3.8f1
    Mobile Notifications 2.2.2
    Firebase 11.6.0

    Exception java.lang.RuntimeException:
    at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4184)
    at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4340)
    at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:101)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2584)
    at android.os.Handler.dispatchMessage (Handler.java:106)
    at android.os.Looper.loopOnce (Looper.java:226)
    at android.os.Looper.loop (Looper.java:313)
    at android.app.ActivityThread.main (ActivityThread.java:8810)
    at java.lang.reflect.Method.invoke
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:604)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
    Caused by android.app.Fragment$InstantiationException: Unable to instantiate fragment com.unity3d.player.a.d: could not find Fragment constructor
    at android.app.Fragment.instantiate (Fragment.java:562)
    at android.app.FragmentContainer.instantiate (FragmentContainer.java:53)
    at android.app.FragmentState.instantiate (FragmentState.java:77)
    at android.app.FragmentManagerImpl.restoreAllState (FragmentManager.java:2867)
    at android.app.FragmentController.restoreAllState (FragmentController.java:143)
    at android.app.Activity.onCreate (Activity.java:1698)
    at com.unity3d.player.UnityPlayerActivity.onCreate (UnityPlayerActivity.java:35)
    at android.app.Activity.performCreate (Activity.java:8657)
    at android.app.Activity.performCreate (Activity.java:8636)
    at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1417)
    at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4165)
    Caused by java.lang.NoSuchMethodException: com.unity3d.player.a.d.<init> []
    at java.lang.Class.getConstructor0 (Class.java:3325)
    at java.lang.Class.getConstructor (Class.java:2485)
    at android.app.Fragment.instantiate (Fragment.java:543)
     
    Last edited: Jan 18, 2024
  5. Mese

    Mese

    Joined:
    Dec 13, 2015
    Posts:
    41