gpt4 book ai didi

android - 如果我已经添加了 Google Maven 存储库,如何在 Android Studio 中修复此错误?

转载 作者:行者123 更新时间:2023-12-03 05:06:58 25 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Android Studio keeps refusing to resolve com.android.support:appcompat-v7:29.0.1

(6 个回答)


2年前关闭。




我正在使用 Android Studio 2.3.3 版并面临 Gradle 错误。我已添加 Logcat下面的错误..

我在 Stack Overflow 上尝试了几个解决方案,上面写着添加 Google Maven 存储库,但错误已经存在。我也在添加下面的代码:

Google 已经添加了 Maven 存储库。仍然不起作用。

Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:29.+
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/Haris Usmani/AndroidStudioProjects/CabApp/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

我期待 gradle成功构建,但它没有这样做。相反,它失败了!

最佳答案

这是因为 com.android.support:appcompat-v7:29.x.x不存在。
您可以查看revision history .
Also:

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 - 如果我已经添加了 Google Maven 存储库,如何在 Android Studio 中修复此错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56680990/

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