android - 添加约束布局障碍在Android Android Studio的上下文菜单中丢失

标签 android android-studio android-constraintlayout

我目前正在阅读 ConstraintLayout 教程并卡在特定步骤 (https://codelabs.developers.google.com/codelabs/constraint-layout/#10)。

来源在这里(https://github.com/googlecodelabs/constraint-layout)。

根据下面的说明,它说要添加垂直屏障,但我在菜单中看不到添加选项。实际上整个菜单选项看起来都不一样。 “添加垂直障碍”菜单在哪里?

Right click on ConstraintLayout in the blueprint or the Component Tree. You will see the Add Vertical barrier and Add Horizontal barrier options.

我运行的是 Android 2.3.3。

build.gradle(模块:应用程序)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.google.googleio"
        minSdkVersion 22
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support.constraint:constraint-layout:1.1.0-beta1'
}

enter image description here

最佳答案

I am running Android 2.3.3.

我猜你的意思是你运行的是 Android Studio 2.3.3。在那种情况下,没有这样的菜单。这是在 Android Studio 3.0 中添加的,从今天开始提供测试版。

关于android - 添加约束布局障碍在Android Android Studio的上下文菜单中丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46028235/

相关文章:

java - 在 Android 应用程序开发中的一个文本字段和一项 Activity 中打印所有提取的电子邮件

android - ConstraintLayout 中的 selectableItemBackgroundBorderless 问题

java - 插入时应用程序卡住(Android SQLite DB)

java - 我想自动同时滑动 3 View 寻呼机

android - 从网络下载 Artifact 时,Gradle 抛出错误。正在 Android Studio 中重试下载...

Android studio应用程序与mysql的连接

android - 如何让 Android Studio gradle 执行预构建步骤

android - 在 ConstraintLayout 中滚动浏览 RecyclerView 时如何折叠工具栏?

android - Android Flow虚拟布局可以处理可变宽度的 View 吗

java - 从 Activity 中设置偏好