Could not find com.android.support.constraint:constraint-layout的问题解决

这几天使用android studio的各种坑之一:

Error:Could not find com.android.support.constraint:constraint-layout:1.0.2.
Required by:
project :mvp
<a href="searchInBuildFiles">Search in build.gradle files</a>

在于没有按照上的sdk中的constraint-layout,打开file->settings,找打android sdk项里的sdk tools,点击右下角的“Show Package Details”,然后找到Support Repository项,在下面的ContraintLayout for android和Solver for ConstraintLayout中选中版本1.0.2进行安装。 

原文地址:https://www.cnblogs.com/freemobile/p/9370569.html