【问题标题】:How to fix? "ERROR: : Could not find any version that matches com.android.support:appcompat-v7:29.+." [duplicate]怎么修? “错误::找不到任何与 com.android.support:appcompat-v7:29.+ 匹配的版本。” [复制]
【发布时间】:2019-06-22 10:21:15
【问题描述】:

我将一个由 unity 生成的项目导入到 android studio。 我在build.gradle 有问题。

我也安装了 Android Support Repository,但问题就是这样。 Sync阶段的这三个错误

"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'
    }

【问题讨论】:

标签: android gradle build.gradle android-appcompat


【解决方案1】:

据我所知,最新版本的 appcompat 是 28.0.0,所以没有 29 或更高版本。

如果您想使用最新的功能和更新,您必须迁移到 AndroidX

来源mvnrepository.com

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-10
    • 1970-01-01
    • 2020-08-14
    • 1970-01-01
    • 2017-10-28
    相关资源
    最近更新 更多