Installation of the com:android:support:percent:22.2.1 library fails in Android Studio

7.6k Views Asked by At

Installation of the com:android:support:percent:22.2.1 library fails in Android Studio, although I have the Android Support Library and the Android Support Repository installed in the SDK Manager.

Does anyone know how to fix this?

This is my gradle file:

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

There are 3 best solutions below

3
On BEST ANSWER

The com:android:support:percent:22.2.1 doesn't exist.

It wasn't published with the other libraries. If you check your SDK folder, you will find only the 22.2.0.

UPDATE The library is now officially published with com:android:support:percent:28.0.0

3
On

Remember as documentation states:

The Android Support Library package is provided as a supplemental download to the Android SDK and is available through the Android SDK Manager.

You need to open the SDK Manager and at the bottom there is the "extras subtitle" and just tick the Repository for com:android:support:22.2.1. And let it download...

Then just change your gradle files as usual.

0
On

18 May 2019, I am using the library and it is:

com.android.support:percent:28.0.0

Usage of it in (Module:app) .gradle file:

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

Google documentation reference link is: Percent Support Library