简体   繁体   English

Android Studio 4.1 Canary 1 未显示布局检查器实时更新

[英]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.我已经安装了Android Studio 4.1 Canary,布局检查器根本没有显示实时更新和进程。 Enabled Experimental from Android Studio Settings but not happened anything.从 Android Studio 设置启用实验,但没有发生任何事情。

Here is my build.gradle file.这是我的build.gradle文件。 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'



}

您必须在 API 29 或更高版本中运行您的 Android Studio 项目才能查看 Android Studio Canary 版本的布局检查器的实时更新。

Had a similar issue, seems like layout inspector works with recent Android version emulators.有一个类似的问题,似乎布局检查器适用于最近的 Android 版本模拟器。

Didn't work with API 28 emulator but worked with an API 29 one.不适用于 API 28 模拟器,但适用于 API 29 模拟器。

This issue fixed after updating Android Studio 4.1 Canary 2 .此问题在更新Android Studio 4.1 Canary 2后修复。 Now it's working fine.现在它工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM