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

IllegalStateException: Attempting to launch an unregistered ActivityResultLauncher #4317

Open
mengqianX opened this issue Dec 29, 2024 · 0 comments
Labels
Issue-Bug Related unexpected behavior or something worth investigating. Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty.

Comments

@mengqianX
Copy link

Exception

App Name: Amaze File Manager
Version: 3.10
User Action: UI Error
Request: Application crash
OS: Linux Android 11 - 30
Device: Google Nexus 4

crash log
java.lang.IllegalStateException: Attempting to launch an unregistered ActivityResultLauncher with contract androidx.activity.result.contract.ActivityResultContracts$StartActivityForResult@26ceea5 and input Intent { act=android.intent.action.OPEN_DOCUMENT_TREE (has extras) }. You must ensure the ActivityResultLauncher is registered before calling launch().
        at androidx.activity.result.ActivityResultRegistry$2.launch(ActivityResultRegistry.java:168)
        at androidx.fragment.app.Fragment$10.launch(Fragment.java:3612)
        at androidx.activity.result.ActivityResultLauncher.launch(ActivityResultLauncher.java:47)
        at com.amaze.filemanager.ui.fragments.MainFragment.lambda$loadPathInQ$4$com-amaze-filemanager-ui-fragments-MainFragment(MainFragment.java:731)
        at com.amaze.filemanager.ui.fragments.MainFragment$$ExternalSyntheticLambda13.run(Unknown Source:4)
        at com.amaze.filemanager.ui.ExtensionsKt.runIfDocumentsUIExists(Extensions.kt:124)
        at com.amaze.filemanager.ui.fragments.MainFragment.lambda$loadPathInQ$5$com-amaze-filemanager-ui-fragments-MainFragment(MainFragment.java:728)

        at com.amaze.filemanager.ui.fragments.MainFragment$$ExternalSyntheticLambda7.onClick(Unknown Source:6)

        at android.view.View.performClick(View.java:7448)

        at android.view.View.performClickInternal(View.java:7425)

        at android.view.View.access$3600(View.java:810)
        at android.view.View$PerformClick.run(View.java:28305)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
@VishnuSanal VishnuSanal changed the title crash IllegalStateException: Attempting to launch an unregistered ActivityResultLauncher Dec 30, 2024
@VishnuSanal VishnuSanal added Issue-Bug Related unexpected behavior or something worth investigating. Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty. labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Related unexpected behavior or something worth investigating. Issue-Easy (good first issue) Beginners welcome! Issues with relative low difficulty.
Projects
None yet
Development

No branches or pull requests

2 participants