【发布时间】:2018-05-22 20:13:21
【问题描述】:
这是来自日志的完整消息: 错误:无法解析配置 ':app:debugCompileClasspath' 的所有文件。
找不到 com.android.support:appcompat-v7:26.1.0。 在以下位置搜索: 文件:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom 文件:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar 文件:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom 文件:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar 文件:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom 文件:/C:/Users/Anatoly/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar 文件:/C:/android/AndroidStudio/gradle/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom 文件:/C:/android/AndroidStudio/gradle/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar 要求: 项目:应用程序
我的 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'
}
}
我的 build.gradle of app:
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'
}
【问题讨论】:
-
我无法启动 Android Studio 项目,我收到此错误:无法解析所有配置文件 ':app:debugCompileClasspath'。
标签: android