【问题标题】:Android Studio 4.1 Canary 1 not showing Layout Inspector Live updatesAndroid Studio 4.1 Canary 1 未显示 Layout Inspector Live 更新
【发布时间】:2020-03-11 04:18:04
【问题描述】:

我已安装 Android Studio 4.1 Canary,但 Layout Inspector 根本没有显示实时更新和进程。从 Android Studio 设置中启用 Experimental 但没有发生任何事情。

这是我的 build.gradle 文件。所以一切看起来都不错,但没有显示实时更新。

 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'



}

【问题讨论】:

  • 金丝雀版本包含错误,因此它可能是其中之一。

标签: android android-studio android-layout layout-inspector


【解决方案1】:

您必须在 API 29 或更高版本中运行您的 Android Studio 项目才能看到 Android Studio Canary 版本的 Layout Inspector 的实时更新。

【讨论】:

    【解决方案2】:

    有一个类似的问题,似乎布局检查器适用于最近的 Android 版本模拟器。

    不适用于 API 28 模拟器,但可以使用 API 29 模拟器。

    【讨论】:

      【解决方案3】:

      更新 Android Studio 4.1 Canary 2 后修复了此问题。现在它工作正常。

      【讨论】:

        猜你喜欢
        • 2016-08-07
        • 2022-01-02
        • 1970-01-01
        • 2017-10-17
        • 1970-01-01
        • 2020-09-20
        • 2018-04-12
        • 2022-11-24
        相关资源
        最近更新 更多