【问题标题】:Installation of the com:android:support:percent:22.2.1 library fails in Android Studio在 Android Studio 中安装 com:android:support:percent:22.2.1 库失败
【发布时间】:2015-07-21 10:20:08
【问题描述】:

在 Android Studio 中安装 com:android:support:percent:22.2.1 库失败,尽管我在 SDK 管理器中安装了 Android 支持库和 Android 支持库。

有谁知道如何解决这个问题?

这是我的 gradle 文件:

dependencies {
    compile 'de.greenrobot:eventbus:2.4.0'
    compile 'com.android.support:support-v4:22.0.0'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.kbeanie:image-chooser-library:1.4.3@aar'
    compile 'com.android.support:recyclerview-v7:22.2.1'
    compile 'com.android.support:design:22.2.1'
    compile(name:'Chart-2015.1.423-dev-release', ext:'aar')
    compile(name:'Common-2015.1.423-dev-release', ext:'aar')
    compile(name:'Data-2015.1.423-dev-release', ext:'aar')
    compile(name:'Feedback-2015.1.423-dev-release', ext:'aar')
    compile(name:'Input-2015.1.423-dev-release', ext:'aar')
    compile(name:'List-2015.1.423-dev-release', ext:'aar')
    compile(name:'Primitives-2015.1.423-dev-release', ext:'aar')
    compile 'net.danlew:android.joda:2.7.1'
    compile 'com.google.android.gms:play-services:7.5.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.3.2@aar') {
        transitive = true;
    }
    compile 'com.google.code.gson:gson:2.3.1'
    compile 'com.android.support:multidex:1.0.0'
 }

【问题讨论】:

标签: android android-support-library android-percent-library


【解决方案1】:

com:android:support:percent:22.2.1不存在

它没有与其他库一起发布。如果你检查你的 sdk 文件夹,你会发现只有 22.2.0。

更新 该库现已正式发布,com:android:support:percent:23.0.1

【讨论】:

  • 所以这个文档github.com/codepath/android_guides/wiki/…肯定包含一个错误...
  • @GabrieleMariotti 那我为什么会看到这个警告 - A newer version of com.android.support.appcompat-v7 than 22.2.0 is available: appcompat-v7:22.2.1
  • @IgorGanapolsky 因为百分比库不是 appcompat 库。此外,虽然所有支持库都更新到 22.2.1,但百分比库的最新版本仍然是 22.2.0。
【解决方案2】:

请记住文档中的说明:

Android 支持库包作为补充下载提供给 Android SDK,可通过 Android SDK Manager 获得。

您需要打开 SDK 管理器,在底部有“附加字幕”,只需勾选 com:android:support:22.2.1 的 Repository。并让它下载...

然后像往常一样更改你的 gradle 文件。

【讨论】:

  • 现在不是23.0.1吗?
  • 现在是23.1.0
  • 25.1.0 或更高版本
【解决方案3】:

2019 年 5 月 18 日,我正在使用该库,它是:

com.android.support:percent:28.0.0

在(Module:app) .gradle 文件中的使用:

implementation 'com.android.support:percent:28.0.0'

Google 文档参考链接是:Percent Support Library

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多