导入项目的时候报错Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha7

问题描述

今天在导入项目的时候报错:

Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha7.

技术分享

原因是:没有下载相应版本的ConstraintLayout。

解决方案

工具栏上选择 Tools --> Android -->SDK Manager 

技术分享

切换到SDK Tools选项,在右下角处勾选 Show Package Details

 技术分享

Support Repository下的ConstraintLayout for Android 和 Solver for ConstraintLayout 中选中自己需要的版本(gradle中依赖的版本)

技术分享

点OK进行下载

 技术分享

技术分享

再同步gradle就可以了

 技术分享

参考资料

依赖ConstraintLayout报错,Could not find *****,Failed to resolve:*****

 

文章来自:http://www.cnblogs.com/whycxb/p/7484827.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3