javascript - 我无法创建新项目 “Unable to resolve dependency for ':app @ debug/compileClasspath'”

标签 javascript android android-studio gradle

我正在使用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/

相关文章:

javascript - 注入(inject)内容/HTML而不改变DOM

javascript - 未知提供商错误 hoteldatafactory <- hoteldatafactory

javascript - 如何取消 Cypress 中的特定请求?

java - 如何将单位未知的字符串作为称重对象进行处理

android - 如何将图像设置为RelativeLayout背景

android - 64K 方法计数超出错误,接近 62.5K 方法引用计数

java - "Display over other apps"

javascript - 带页面的框滚动

java - Android AsyncTask 下载多张图片

android - 合并来自android studio和远程端(Bit-bucket)的双方代码