gpt4 book ai didi

AndroidStudio 梯度同步 : failed to resolve

转载 作者:行者123 更新时间:2023-11-29 17:31:17 25 4
gpt4 key购买 nike

我有新的 clear android 应用程序。我想将 volley 添加到我的应用程序中以发出 HTTP 请求。我正在使用 Gradle 使用 Android Studio 开发应用程序。这是我的应用程序的屏幕截图: enter image description here

你看,我要把 volley 添加到我的应用程序中,添加这行代码 com.mcxiaoke.volley:library-aar:1.0.0 来构建。渐变文件

我也尝试添加 Retrofit。但它给出了相同类型的错误:未能解决:bla bla bla。

所以我认为在我的情况下,gradle 无法同步与 com.android 不同的任何其他库......

而且我也尝试将这行代码添加到我的 build.gradle 中。但一切都没有改变

 buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
repositories {
mavenCentral()
}
}

请指教

编辑:在注释后为项目和模块添加了 build.gradle 文件。项目:

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}

allprojects {
repositories {
jcenter()
}
}

模块:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.0"

defaultConfig {
applicationId "domain.testgradle"
minSdkVersion 11
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'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
}

最佳答案

Volley 现在由 Android 开源项目在 jCenter 上发布:

dependencies {
compile 'com.android.volley:volley:1.0.0'
}

关于AndroidStudio 梯度同步 : failed to resolve,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32859819/

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