I got error when I call the ```registerForActivity...
# compose
m
I got error when I call the
Copy code
registerForActivityResult(ActivityResultContracts.StartActivityForResult())
error in thread
s
Error?
m
java.lang.ClassCastException: dagger.hilt.android.internal.managers.ViewComponentManager$FragmentContextWrapper cannot be cast to androidx.activity.result.ActivityResultRegistryOwner
this is error
i
It sounds like you're not actually using the latest version of
activity-compose
, where that method was renamed to
rememberLauncherForActivityResult
- the latest version should unwrap
ContextWrapper
instances just fine
l
This kind of issues could be fixed with version constraints from AndroidX side…
💯 1
m
@Ian Lake I'm using
activity-compose:1.3.0-beta02
and
compose:1.0.0-beta09
And it still doesn't work and getting the same error