aslamhossin
aslamhossin

Reputation: 1277

Android Studio 4.1 Canary 1 not showing Layout Inspector Live updates

I have installed Android Studio 4.1 Canary but Layout Inspector not showing Live updates and Processes at all. Enabled Experimental from Android Studio Settings but not happened anything.

Here is my build.gradle file. So everything looks ok but not showing live updates.

 apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs.kotlin"

android {
    compileSdkVersion 29

    defaultConfig {
        applicationId "com.example.test"
        minSdkVersion 21
        targetSdkVersion 29
        buildToolsVersion "29.0.3"
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
    configurations.all {
        resolutionStrategy {
            force 'androidx.appcompat:appcompat:1.1.0'
            force  'com.google.android.exoplayer:exoplayer:2.10.4'
        }
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'



}

Upvotes: 1

Views: 5170

Answers (3)

Mina Wissa
Mina Wissa

Reputation: 10971

Had a similar issue, seems like layout inspector works with recent Android version emulators.

Didn't work with API 28 emulator but worked with an API 29 one.

Upvotes: 1

aslamhossin
aslamhossin

Reputation: 1277

This issue fixed after updating Android Studio 4.1 Canary 2. Now it's working fine.

Upvotes: 0

Jaimil Patel
Jaimil Patel

Reputation: 1347

You have to run your Android Studio Project in API 29 or higher to see live updates of Layout Inspector of Android Studio Canary Version.

Upvotes: 1

Related Questions