![Gradle 同步时报错,Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8的解决方法 Gradle 同步时报错,Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8的解决方法](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8.
原因:
SDK 中可能是没有安装ConstraintLayout的支持包
解决办法:
在SDK中安装ConstraintLayout 支持包, Android Studio下的操作:
- Preferences > Appearance & Behavior > System Settings > Android
- 点开窗口右边的SDK Tools 标签
- 展开Suport Repository, 并点击 Show Package Details,
- 把ConstraintLayout for Android和Solver for ConstraintLayout的对应版本 勾上安装, 注意版本号!
![Gradle 同步时报错,Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8的解决方法 Gradle 同步时报错,Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8的解决方法](https://image.shishitao.com:8440/aHR0cDovL3d3dy5iZWFuc29mdC5iaXovd3AtY29udGVudC91cGxvYWRzLzIwMTcvMDEvOTUwREVFOTktQTFCQi00M0RDLUFEMDktRDA4RUQ4NkMzNTc5LTI4NjAtMDAwMDBGQTU5MjhDNEM5OF9maWxlLnBuZw%3D%3D.png?w=700&webp=1)