Home > Enterprise >  Not showing Deploy Preview button in Android Studio for com.android.library modules
Not showing Deploy Preview button in Android Studio for com.android.library modules

Time:02-05

I'm probably missing something obvious but I'm unable to show the enter image description here

However if I open the enter image description here

Edit 2

I noticed that the button is only appearing in 'com.android.application' modules and not in 'com.android.library' modules ¯_(ツ)_/¯

CodePudding user response:

Did you enable it on the experimental panel in AS settings?

Also, I believe you're missing the preview dependency implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"

enter image description here

CodePudding user response:

This behaviour is only visible in an Android library.

plugins {
    id 'com.android.library'
    ...
}

android {
    compileSdk 31

    defaultConfig {
        minSdk 21
        ... 
...

This is a known bug in Android Studio.

Unfortunately it is not documented anywhere except for this issue.
It has been fixed in Chipmunk Canary 2

  •  Tags:  
  • Related