17

Today, Google released SDK 6 API 23+.

I tried to create a project with the API 23, but I'm having the following problem:

Failed to resolve: com.android.support:appcompat-v7:23.0

Here's my gradle file:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "my.package"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    wearApp project(':wear')
    compile 'com.android.support:appcompat-v7:23.0'
    compile 'com.google.android.gms:play-services:7.8.0'
}

In the SDK manager, the version 23 isn't listed to update:

enter image description here

How can I solve this?

vitorvigano
  • 697
  • 2
  • 8
  • 18

5 Answers5

48

Original answer:

I too tried to change the support library to "23". When I changed the targetSdkVersion to 23, Android Studio reported the following error:

This support library should not use a lower version (22) than the targetSdkVersion (23)

I simply changed:

compile 'com.android.support:appcompat-v7:23.0.0'

to

compile 'com.android.support:appcompat-v7:+'

Although this fixed my issue, you should not use dynamic versions. After a few hours the new support repository was available and it is currently 23.0.1.


Pro tip:

You can use double quotes and create a ${supportLibVersion} variable for simplicity. Example:

ext {
    supportLibVersion = '23.1.1'
}

compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
compile "com.android.support:palette-v7:${supportLibVersion}"
compile "com.android.support:customtabs:${supportLibVersion}"
compile "com.android.support:gridlayout-v7:${supportLibVersion}"

source: https://twitter.com/manidesto/status/669195097947377664

Jared Rummler
  • 37,824
  • 19
  • 133
  • 148
  • 1
    try this `compile 'com.android.support:appcompat-v7:23.0.0' ` and do not forget to download the udpate (just available) ;) – Piotr Aug 19 '15 at 14:35
20

As seen in the revision column of the Android SDK Manager, the latest published version of the Support Library is 22.2.1. You'll have to wait until 23.0.0 is published.

Edit: API 23 is already published. So u can use 23.0.0

silwar
  • 6,470
  • 3
  • 46
  • 66
ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
  • 1
    This is constantly going to be outdated. Is there a link that shows the most current version? – Bryan Bryce Jul 12 '16 at 21:26
  • 3
    The [Support Library Revision History page](https://developer.android.com/topic/libraries/support-library/revisions.html) always tells you the latest version. – ianhanniballake Jul 12 '16 at 21:38
7

Ran into a similar issue using React Native

> Could not find com.android.support:appcompat-v7:23.0.1.

the Support Libraries are Local Maven repository for Support Libraries

enter image description here

skilleo
  • 2,451
  • 1
  • 27
  • 34
  • works for me . i think it is just gradle can't find it in the jcenter repositoriy – danny Mar 27 '16 at 17:13
  • 1
    @AlainIb enabled the highlighted "Local Maven for Support Libraries" – skilleo Jul 19 '17 at 20:47
  • ok thanks. strangly it work just after re running "react-native run-android" 3 or 4 times the project and cleaning each it. it is like some time it work some time not without changing anything – AlainIb Jul 19 '17 at 21:45
2

First you need to download the latest support repository (17 by the time I write this) from internal SDK manager of Android Studio or from the stand alone SDK manager. Then you can add compile 'com.android.support:appcompat-v7:23.0.0' or any other support library you want to your build.gradle file. (Don't forget the last .0)

Navid Eivazzadeh
  • 337
  • 3
  • 13
0

Latest published version of the Support Library is 24.1.1, So you can use it like this,

compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:design:24.1.1'

Same as for other support components.

You can see the revisions here,
https://developer.android.com/topic/libraries/support-library/revisions.html

Alok Patel
  • 7,842
  • 5
  • 31
  • 47