gpt4 book ai didi

android - 错误 :Could not resolve all files for configuration ':app:debugCompileClasspath'

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:19:18 51 4
gpt4 key购买 nike

这是来自日志的完整消息:错误:无法解析配置“:app:debugCompileClasspath”的所有文件。

Could not find com.android.support:appcompat-v7:26.1.0. Searched in the following locations: file:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom file:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar file:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom file:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar file:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom file:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar file:/C:/android/AndroidStudio/gradle/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom file:/C:/android/AndroidStudio/gradle/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar Required by: project :app

我的gradle-wrapper.properties

distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

我的项目的build.gradle

buildscript {
repositories {
// Gradle 4.1 and higher include support for Google's Maven repo using
// the google() method. And you need to include this repo to download
// Android plugin 3.0.0 or higher.
google()
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}

我的app的build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26



defaultConfig {
applicationId "ru.foodrobot.test2"
minSdkVersion 10
targetSdkVersion 26
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

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

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

最佳答案

我修改了项目级别/gradle.build

allprojects {
repositories {
jcenter()

到:

allprojects {
repositories {
jcenter { url "http://jcenter.bintray.com/"}

在文件中:

platforms/android/build.gradle

关于android - 错误 :Could not resolve all files for configuration ':app:debugCompileClasspath' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47716783/

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