I'm using Android Studio with an external Android SDK. I have installed the support library and the support repository. The support repository is in:
~/Development/Tools/android/sdk/extras/android/m2repository
When I add a dependency to the support library in the build.gradle
file, like:
...
repositories {
mavenCentral()
}
...
dependencies {
compile "com.android.support:support-v4:18.0.+"
}
Android Studio cannot find the support libraries (cannot resolve symbol etc) and Gradle also cannot find the libraries:
Gradle: A problem occurred configuring project ':TestAndroidStudio'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':TestAndroidStudio:_DebugCompile'.
> Could not find any version that matches com.android.support:support-v4:18.0.+.
Required by:
TestAndroidStudio:TestAndroidStudio:unspecified
How do I specify in Android Studio and/or the build.gradle
file the location of the Android support repository?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…