正在使用android studio。有以下依賴關係。 Gradle未能找到第三方庫volley和square,但找到appcompat:Gradle未能找到庫
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.mcxiaoke.volley:library:[email protected]'
compile 'com.squareup.phrase:phrase:1.0.3'
。
Error:Failed to find: com.mcxiaoke.volley:library:1.0.+
我已經更新了Android SDK Manager工具和Extras,包括支持庫,但仍然沒有運氣。我用jcenter()和mavenCentral()都試過。誰能幫忙?
build.gradle
:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
dependencies{
}
}
app/build.gradle
:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.tap"
minSdkVersion 8
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.mcxiaoke.volley:library:[email protected]'
compile 'com.squareup.phrase:phrase:1.0.3'
}
settings.gradle
:
include ':app'
在依賴項中使用此編譯'com.mcxiaoke.volley:library:1.0。+'獲取更多詳細信息請參閱https://github.com/mcxiaoke/android-volley – San