Failed to resolve: com.android.volley:volley:1.1.0 ....glide:3.7.0
Asked Answered
A

4

9

'gradle' 'import' was done. Then I got a problem. Help.

D:\bg.jou\GanggoContacts\build.gradle

Error:(25, 13) 

Failed to resolve: com.android.volley:volley:1.1.0
<a href="openFile:D:/bg.jou/GanggoContacts_v34_insert_error/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:(26, 13)

 Failed to resolve: com.github.bumptech.glide:glide:3.7.0
<a href="openFile:D:/bg.jou/GanggoContacts_v34_insert_error/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

not complete problem

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

dependencies {
    //compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.google.android.gms:play-services-gcm:11.8.0'
    compile fileTree(include: '*.jar', dir: 'libs')

    compile project(':fingerpush_3.0.7')
    compile 'com.android.volley:volley:1.1.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
}
Aphorize answered 7/2, 2018 at 0:58 Comment(2)
The second dependencies is in which build.gradle file? Make sure it is inside the one which is inside app module.Creight
'gradle' is the only one at the 'app' level.Snowshed
C
15

jcenter() is now deprecated.

Use this in build.gradle of app: 'com.android.volley:volley:1.2.0'

And this in build.gradle:

repositories {
    google()
    mavenCentral()
}
Carcanet answered 7/6, 2021 at 20:6 Comment(0)
G
7

One of the solutions below must solve your problem:

1- If you've added the following line in your "module/app" build.gradle,

compile 'com.android.volley:volley:1.1.0'

you need to have the following code in your "project" build.gradle in order to enable your programming environment to find and download volley package

   allprojects {

    repositories {
         jcenter()
    }
}

2- You are living in a country which is under U.S. and International sanctions and that's why your programming environment cannot connect automatically to jcenter(bintray.com) to download the library, even though you've added jcenter to your repo list. If so, you have to use a proxy while syncing gradle.

Geophagy answered 10/3, 2018 at 11:35 Comment(0)
Y
4

Add this snippet to your build.gradle file,

allprojects {
    repositories {
        google()
        jcenter()
    }
}

and replace with this -

buildscript {
    repositories {
        google() // Just google() will be fine
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

If, you are using gradle version lower than 4.1 - replace
google()
with

maven {
    url 'https://maven.google.com'
}
Yamauchi answered 7/2, 2018 at 5:24 Comment(0)
I
0

you probably need to force the project to use the latest version of volley

Inweave answered 21/9, 2022 at 18:55 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewDorn

© 2022 - 2024 — McMap. All rights reserved.