1. 程式人生 > >關於 Could not find support-v4.jar (com.android.support:support-v4:26.1.0)

關於 Could not find support-v4.jar (com.android.support:support-v4:26.1.0)

Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_locvargoDebugApk'.    > A problem occurred configuring project ':baselib'.       > Could not find support-v4.jar (com.android.support:support-v4:26.1.0).         Searched in the following locations:             https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.jar

這很尷尬了,找了半天找不到問題開啟

https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.jar也返回404

百度了下,發現,從api 26開始,support libraries 需要從google的maven倉庫下載,所以需要在project的build.gradle中allprojects 新增如下配置即可

maven { url "https://maven.google.com" }

經驗證,確實可行,