導入項目的時候報錯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:*****

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM