Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] app在后台,从启动器再次打开有几率闪退 #346

Open
3 tasks done
Treetreewu opened this issue Nov 14, 2024 · 0 comments
Open
3 tasks done

[BUG] app在后台,从启动器再次打开有几率闪退 #346

Treetreewu opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Treetreewu
Copy link

  • 已阅读 Q&A

  • 非插件导致(如搜索结果不全,无法导入等都属于插件问题)

  • 不与其他 issue 重复

问题描述

app在后台放了比较久的时间,大概是一天左右,从启动器再次打开有几率闪退。

预期行为

正常启动

详细的复现步骤

  1. 启动app
  2. 回到桌面
  3. 等待
  4. 启动app

截图

日志

java.lang.RuntimeException: Unable to start activity ComponentInfo{fun.upup.musicfree/fun.upup.musicfree.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.swmansion.rnscreens.ScreenStackFragment: calling Fragment constructor caused an exception
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4001)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4154)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:99)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2599)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:224)
at android.os.Looper.loop(Looper.java:318)
at android.app.ActivityThread.main(ActivityThread.java:8719)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.swmansion.rnscreens.ScreenStackFragment: calling Fragment constructor caused an exception
at androidx.fragment.app.Fragment.instantiate(Fragment.java:631)
at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:483)
at androidx.fragment.app.FragmentStateManager.(FragmentStateManager.java:85)
at androidx.fragment.app.FragmentManager.restoreSaveState(FragmentManager.java:2728)
at androidx.fragment.app.FragmentController.restoreSaveState(FragmentController.java:198)
at androidx.fragment.app.FragmentActivity$2.onContextAvailable(FragmentActivity.java:149)
at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.java:99)
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:362)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:273)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:46)
at android.app.Activity.performCreate(Activity.java:8891)
at android.app.Activity.performCreate(Activity.java:8856)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1468)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3983)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at androidx.fragment.app.Fragment.instantiate(Fragment.java:613)
... 26 more
Caused by: java.lang.IllegalStateException: Screen fragments should never be restored. Follow instructions from software-mansion/react-native-screens#17 (comment) to properly configure your main activity.
at com.swmansion.rnscreens.ScreenFragment.(ScreenFragment.kt:65)
at com.swmansion.rnscreens.ScreenStackFragment.(ScreenStackFragment.kt:40)
... 29 more

其他信息

设备型号:红米K70pro
系统版本:hyperos1.0.21.0(Android14)
应用版本:0.4.4

@Treetreewu Treetreewu added the bug Something isn't working label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant