gpt4 book ai didi

Android Studio 一直拒绝解析 com.android.support :appcompat-v7:29. 0.1

转载 作者:行者123 更新时间:2023-12-03 05:34:38 24 4
gpt4 key购买 nike

我已经提到了this线程,但它不能解决我的问题。

我不断收到错误:ERROR: Failed to resolve: com.android.support:appcompat-v7:29.0.1每次我尝试刷新 Gradle 时都在 Android Studio 中。

这是我的build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "com.application.app"
minSdkVersion 14
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:29.0.1'
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'
}

我该如何修复它,是否有一个网站列出了所有 android 模块的所有版本?我自己也找不到。

谢谢。

最佳答案

这是因为 com.android.support:appcompat-v7:29.x.x 不存在 .
您可以查看revision history在官方文档中。
你可以:

  • 使用支持库的最新 28.0.0 版本
  • 迁移到 androidx

  • Also check this note :

    Note: With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX which is part of Jetpack. The AndroidX library contains the existing support library and also includes the latest Jetpack components.

    You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android.support.*) will remain available on Google Maven. However, all new library development will occur in the AndroidX library.

    We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to AndroidX as well.

    关于Android Studio 一直拒绝解析 com.android.support :appcompat-v7:29. 0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57209744/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com