[Android 除錯] Conflict with dependency

Android Studio build 時的錯誤訊息 : Conflict with dependency
詳細錯誤訊息 : Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ.
原因 : project compiler 和 AVD 模擬器的 SDK 版本不一致 (前者為 26,後者為 27)
解法 : 如下圖
------------------------------------------------------------------------------------------------------


圖 1 error message by Android Studio


圖 2 resolution


圖 3 resolution


圖 4 解決後的 AndroidManifest.xml,下方多出兩個 meta-data 中介設定,用來解決版本衝突的問題

猜你喜欢

转载自www.cnblogs.com/WizardWu/p/10690423.html