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
Deepak Gahlot
08/17/2021, 5:04 PM
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
Copy code
val registerTakeFile = rememberLauncherForActivityResult(
ActivityResultContracts.OpenDocument()
) { uri ->}
Deepak Gahlot
08/17/2021, 5:06 PM
when the user selects the file the exception is thrown. I'm using the same ViewModel across the screen and the fragment.