I just tried to load an image from my resources with val context = ambient(ContextAmbient)
but when I try to run the project I get an error during the generation of the code.
java.lang.IllegalStateException: Backend Internal error: Exception during code generation
@Composable
fun MovieImage(image: Int) {
val context = ambient(ContextAmbient)
Container(modifier = Modifier.None, width = 24.dp, height = 24.dp) {
DrawImage(image = imageFromResource( context.resources, image))
}
}