Android Studio Jetpack compose Auto imports are not working anymore

Viewed 550

I've started today with Android Jetpack Compose. At the beginning it worked all fine. On some classes you just have to watch that you get the right package. But on some Point I've messed something up an I don't know what. I've just wanted to Import a package and then some context menu popped up, I accidentally pressed 'Ok' and since then the "Import" doesn't show up anymore when I write a class from a compose package.

On other classes it works fine

On the Jetpack classes it does not work anymore

There is surely an option I've turned off but I don't know what. Can anyone help me with this?

1 Answers

Go to file > Settings in Android Studio then search in the settings for "imports".

Under editor click Auto Import and scroll down to the bottom.

The check the two boxes for Kotlin as shown here:

screenshot.

Related