我正在使用Windows 10和Android Studio版本3.2.1
我面临拖曳问题:
1-当我尝试在SDK管理员中更新或安装软件包时,出现以下消息:
Installation did not complete successfully. see the IDE log for details
2-当我创建一个新项目时,出现此错误:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.
build.gradle(module) :
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.one-click.myapplication"
minSdkVersion 15
targetSdkVersion 29
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:29.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
我尝试了很多解决方案,但没有任何帮助,希望您能帮助我
最佳答案
将实现'com.android.support:appcompat-v7:29.+'更改为以下内容,还将compileSdkVersion 29更改为compileSdkVersion 28,并将targetSdkVersion 29更改为targetSdkVersion 28
实现'com.android.support:appcompat-v7:28.0.0'
实现'com.android.support:support-v4:28.0.0'
关于javascript - 我无法创建新项目 “Unable to resolve dependency for ':app @ debug/compileClasspath'”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60684913/