Failed to resolve:
问题描述
Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2
Install repository and sync project.
Show in file.
Show in project structure dialog.
未能解决:com.android.support.constraint:constraint-layout:1.0.2
安装仓库和同步项目。
文件显示。
在项目结构对话框中显示。
出现场景描述
今天导入了一个网上的开源项目,用Android Studio打开后出现如上提示。
解决办法
问题原因:此项目中使用到了com.android.support.constraint:constraint-layout:1.0.2。但本地没有此库。
解决办法:点击Install repository and sync project.出现安装提示,加载–>解压–>安装之后,点击Finish。
相似问题
如果出现提示不是com.android.support.constraint:constraint-layout:1.0.2,而是类似的com.android.support.constraint:XXXXXXX:X.X.X。解决方法同上,点击Install repository and sync project.下载该库即可。