Gradle Sync 失败找不到约束布局:1.0.0-alpha2

新手上路,请多包涵

问题 :

 Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2.
Required by:
myapp:app:unspecified

背景: Android Studio 2.2 P 1

原文由 NotCool 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 557
2 个回答

无法安装/更新 ConstraintLayout 的支持库。

Just open Preferences > Appearance & Behavior > System Settings > Android and move to SDK Tools tab.检查以下字段并安装。

喜好

原文由 gokhanakkurt 发布,翻译遵循 CC BY-SA 3.0 许可协议

我在 android 下的 build.gradle(app) 中添加了以下脚本,我能够编译。

 compileOptions {
    sourceCompatibility 1.8
    targetCompatibility 1.8
}

原文由 Pavan Pyati 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题