gpt4 book ai didi

java - 所有依赖项均无法解决?

转载 作者:行者123 更新时间:2023-12-02 01:52:17 24 4
gpt4 key购买 nike

我的项目已正确构建并运行,但自从我更新了 Android Studio 后,它出现了这些错误......并且离线工作未检查。

错误

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:multidex:1.0.3. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:design:26.1.0. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:cardview-v7:26.1.0. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:recyclerview-v7:26.1.0. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:appcompat-v7:26.1.0. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support.constraint:constraint-layout:2.0.0. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:support-compat:26.1.0. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.github.ybq:Android-SpinKit:1.1.0. Open File Show Details


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve > com.android.support:appcompat-v7:26.1.0. Open File Show Details


Failed to resolve: com.android.support.test:runner:1.0.2 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support.test.espresso:espresso-core:3.0.2 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support:multidex-instrumentation:1.0.2 Open File Show in Project Structure dialog


Failed to resolve: com.android.support:multidex:1.0.3 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support:design:26.1.0 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support:cardview-v7:26.1.0 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support:recyclerview-v7:26.1.0 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support:appcompat-v7:26.1.0 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support.constraint:constraint-layout:2.0.0 Show in File Show in Project Structure dialog


Failed to resolve: com.github.ybq:Android-SpinKit:1.1.0 Show in File Show in Project Structure dialog


Failed to resolve: com.android.support:support-annotations:26.1.0 Open File Show in Project Structure dialog


Failed to resolve: android.arch.lifecycle:runtime:1.0.0 Open File Show in Project Structure dialog

我的毕业生

apply plugin: 'com.android.application'

android {

compileSdkVersion 26
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.example.radon.vitrin"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

multiDexEnabled true

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}


dependencies {
implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
implementation 'com.google.zxing:core:3.2.1'
implementation files('libs/CircleImageViewmaster/gradle/wrapper/gradle-wrapper.jar')
implementation files('libs/picasso-2.5.2(1).jar')
implementation 'com.android.support:multidex:1.0.3'
//noinspection GradleCompatible
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
//noinspection GradleCompatible
//implementation 'com.google.android.gms:play-services:12.0.1'
//noinspection GradleCompatible
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.android.support.constraint:constraint-layout:2.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:support-compat:26.1.0'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation('io.socket:socket.io-client:1.0.0') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
// implementation 'com.android.volley:volley:1.1.1'
implementation 'com.github.ybq:Android-SpinKit:1.1.0'
implementation 'com.github.danylovolokh:video-player-manager:0.2.0'
implementation 'com.zarinpal:purchase:0.0.8-beta'
implementation 'com.mcxiaoke.volley:library:1.0.19'
}

最佳答案

在您的项目 .gradle(不是应用程序模块)中,您可能缺少 Google 存储库。这就是找不到依赖项的原因。

buildscript {

repositories {
google() // <-- This is the line you must add
jcenter()
}
}

关于java - 所有依赖项均无法解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52804232/

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