I am using “Shared Element Transitions in Compose” and it works fine in debug mode. But when I change it to the release mode, there is an error that it couldn’t find the “SharedTransitionScope”. Has anyone experienced a similar error? I want to know how to solve it.
Error :
Unresolved reference 'ExperimentalSharedTransitionApi'.
Unresolved reference 'SharedTransitionScope'.
Unresolved reference 'ExperimentalSharedTransitionApi'.
Annotation argument must be a compile-time constant.
Unresolved reference 'SharedTransitionScope'.
The part of the code that causes the error
import androidx.compose.animation.ExperimentalSharedTransitionApi
import androidx.compose.animation.SharedTransitionScope
...
@OptIn(ExperimentalSharedTransitionApi::class)
@Composable
fun SharedTransitionScope.HomeScreen(