I cloned volley from git clone https://android.googlesource.com/platform/frameworks/volley and imported it as a new module in AndroidStudio, but I get the following error when syncing:
Failed to resolve: com.android.volley:volley.1.0.0
My build.gradle, in my app folder:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.cs169_au.volleytest1"
minSdkVersion 22
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.google.maps:google-maps-services:0.1.7'
compile 'com.android.volley:volley.1.0.0'
}
repositories {
mavenCentral()
}
Google's official Volley is hosted in JCenter, so you have to add jcenter()
to repositories
in the project's build.gradle:
allprojects {
repositories {
mavenCentral()
jcenter() // Add this line
}
}
Try using this:
compile 'com.mcxiaoke.volley:library:1.0.19'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With