top of page

Jetpack Compose Preview not showing

Updated: Sep 2, 2021

It's most common bug in Jetpack Compose.


You can solve this issue by following these simple steps:

  1. Use latest version dependency. I am using 1.0.1 implementation "androidx.compose.ui:ui-tooling:1.0.1"

  2. Add background and systemUi in your preview @Preview(showSystemUi = true, showBackground = true)

  3. Use the latest gradle version classpath 'com.android.tools.build:gradle:7.0.0'

  4. Use the latest kotlin version classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"

  5. Run the application after applying these changes.



Note: use latest stable version of Android studio 4.2.2 or Latest beta version 2021.1.1 Canary 7 or above.


Android Studio latest stable version(4.2.2) not stable now. It have some gradle issues.

I recommend use beta version to avoid issues.


Android studio beta version link

https://developer.android.com/studio/preview?gclid=Cj0KCQjw6s2IBhCnARIsAP8RfAhgLHUdDh6KablDKBSga36iblWqOJmU6np0ZSGqP4tEWFFCDBQabRQaAimwEALw_wcB&gclsrc=aw.ds


7,146 views0 comments

This site developed for Jetpack Compose tutorial. We will post tutorials frequently. You can also join our community by clicking login. 

  • Twitter
  • LinkedIn

You have any queries contact me. 

Subscribe for latest updates

Thanks for submitting!

bottom of page