Deepak Gahlot

08/17/2021, 4:54 PM
Hello All, I have been struggling with
java.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
I'm trying to launch the file explorer for the user to pick a file, and then when the user clicks to return back to the compose screen . I'm getting this error, this was not there before not sure what has changed
Basically i have a Fragment which hold different jetpack compose navigation screens, and in one of the compose screen i have trying to launch the file explorer using
val registerTakeFile = rememberLauncherForActivityResult(
            ) { uri ->}
when the user selects the file the exception is thrown. I'm using the same ViewModel across the screen and the fragment.
I guess this is also the same issue

Colton Idle

08/18/2021, 1:52 AM
Can you possibly create a minimal sample github repo? I'll clone and take a look if I can help!

Deepak Gahlot

08/18/2021, 4:10 AM
Sure i will do that and share it here