在Android Studio中找不到约束布局 [英] Could not find Constraint Layout inside Android Studio
问题描述
工作室内一切正常,但后来我收到错误消息:
找不到com.android.support.constraint :约束的布局:1.0.0-BETA4。
问题在于我无法在Android Studio中安装约束布局,因为我使用的是Ubuntu.I找到SDK工具(系统设置),像通常在MAC上一样手动安装。
这里没有任何解决方案适用于我,因为它们主要针对MAC OS。
我在Ubuntu 14.04和Gradle 2.2.2上使用Android 2.2。
如果您使用预览版1 ,则使用Android 2.2
,而不是尝试使用
编译'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
Gradle
classpath'com.android.tools.build:gradle:2.2.0'
内部gradle包装器
distributionUrl = https://services.gradle.org/distributions/gradle-2.14.1-all.zip
确保您在离线状态下取消勾选,如果您没有 gradle 2.14.1 构建工具版本 如果您安装了gradle 2.14.1-all Everything was working fine inside studio, but then I get error: Problem is that I can not install Constraint layout in Android Studio because I am using Ubuntu.I can not find SDK Tools(System Settings) to install manually like usually on MAC. None of solutions here worked for me because they are mostly for MAC OS. I am using Android 2.2 on Ubuntu 14.04, and Gradle 2.2.2. I am using Android 2.2 if you use preview 1 than try with compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1' Gradle classpath 'com.android.tools.build:gradle:2.2.0' inside gradle wrapper distributionUrl=https://services.gradle.org/distributions/gradle-2.14.1-all.zip make sure you un-check from offline if you have not gradle 2.14.1 build Tools Version buildToolsVersion '
25
' Best way if you have installed gradle 2.14.1-all
then just go to your layout and then design tab, rignt click on your layout, click to convert,if you haven't installed Constraint lib you see a popup that says install lib, and click on ok. and then you can see in app level gradle file Constraint layout dependency added. 这篇关于在Android Studio中找不到约束布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
buildToolsVersion'
25
'
,那么只需进入您的布局然后设计选项卡,然后点击您的布局,点击转换,如果你还没有安装Constraint lib,你会看到一个弹出窗口,说安装lib,然后点击ok。然后你可以在应用程序级别看到gradle文件中添加约束布局依赖关系。
Could not find com.android.support.constraint:constraint-layout:1.0.0-beta4.