怎么修? “错误::找不到与com.android.support:appcompat-v7:29.+匹配的任何版本。”

时间:2019-06-22 10:21:15

标签: android gradle build.gradle android-appcompat

我将统一生成的项目导入android studio。 我在build.gradle中遇到问题。

我也安装了Android支持存储库,但问题仍然存在。 同步阶段的这三个错误

"ERROR: Unable to resolve dependency for ':@debug/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.
Show Details
Affected Modules: AR
ERROR: Unable to resolve dependency for ':@debugAndroidTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.
Show Details
Affected Modules: AR
ERROR: Unable to resolve dependency for ':@debugUnitTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.
Show Details
Affected Modules: AR"
Error at build output

Could not find any version that matches com.android.support:appcompat-v7:29.+.
Versions that do not match:
  - 28.0.0
  - 28.0.0-rc02
  - 28.0.0-rc01
  - 28.0.0-beta01
  - 28.0.0-alpha3
  - + 50 more
Required by:
    project :

Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager

build.gradle的代码。

-->>>>


allprojects {

    repositories {
        google()
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}



android {
    compileSdkVersion 29
    buildToolsVersion '29.0.0'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

dependencies
 {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation(name: 'UnityChannel', ext: 'aar')

    implementation(name: 'VuforiaWrapper', ext: 'aar')
    implementation 'com.android.support:appcompat-v7:29.+'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
}

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 29
        applicationId 'com.hj.ar'
        ndk {
            abiFilters 'armeabi-v7a', 'x86'
        }
        versionCode 1
        versionName '1.0'
    }

1 个答案:

答案 0 :(得分:0)

我知道appcompat的最新版本为28.0.0,因此没有29或更高版本。

如果要使用最新功能和更新,则必须迁移到 AndroidX

来源mvnrepository.com

相关问题