gpt4 book ai didi

android - 在Android Studio 3.1.2中添加Volley的问题

转载 作者:行者123 更新时间:2023-12-03 05:46:00 25 4
gpt4 key购买 nike

我想在Android Studio 3.1.2中将Volley添加到我的项目中。我正在尝试使用implementation 'com.android.volley:volley:1.1.0'

这是项目的Gradle:

buildscript {
ext.kotlin_version = '1.2.41'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
mavenCentral()
maven {
url "https://maven.google.com"
name 'Google'
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

但是它失败,并出现以下错误:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.volley:volley:1.1.0.
Open File
Show Details


Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.volley:volley:1.1.0.
Open File
Show Details


Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.android.volley:volley:1.1.0.
Open File
Show Details


Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.android.volley:volley:1.1.0.
Open File
Show Details


Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.android.volley:volley:1.1.0.
Open File
Show Details

这是错误的图像,希望能更好地理解问题。
enter image description here

我在这里想念的是什么?

最佳答案

事实证明,执行Invalidate Caches / Restart可以解决问题!

关于android - 在Android Studio 3.1.2中添加Volley的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50116612/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com