android - 怎么修? "ERROR: : Could not find any version that matches com.android.support:appcompat-v7:29.+."

标签 android gradle build.gradle android-appcompat

<分区>

我导入了一个unity生成的工程到android studio。 我在 build.gradle 中遇到问题。

我也安装了 Android 支持存储库,但问题仍然存在。 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'
    }

最佳答案

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

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

来源mvnrepository.com

关于android - 怎么修? "ERROR: : Could not find any version that matches com.android.support:appcompat-v7:29.+.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56714617/

相关文章:

java - Android 动态行创建中的 IllegalStateException

android - 未在 android studio 中创建的新项目

java - 在构建 Android 应用程序之前,将 jar 从其他目录拉到 libs 文件夹

Android Studio gradle 无法解析 SDK 版本 16

android udp 接收不起作用?

android - 如何在 Activity 之外获取屏幕指标?

java - 以相反的顺序将文件转换为字节数组

java - 使用Gradle应用程序插件使用重新打包的Spring Boot Jar创建发行版

android - 无法为 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler 类型的对象获取未知属性 'compile'

java - 配置 Gradle + Robolectric