Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't Android Support Library version 22 available?

Today I noticed that Android API 22 is available so I changed target SDK of my app to 22. When I did that, Gradle started complaining that support libraries cannot have versions lower than the target SDK version.

I checked Support Library revisions link and it does show that version 22 of "v4 support library" and "v7 appcompat library" have been released. So, I bumped up their versions as well in build.gradle file. Gradle then suggested that I install the "Android Support Repository". I had it installed, but I installed it again; and Gradle continued to complain. When I checked ${android_home}/extras/android/m2repository/support-v4 it indeed did not have the version 22.0.0 folder.

I also directly opened the link https://dl.google.com/android/repository/addon.xml which was used by Support Repository installer and it indeed does not list version 22 libraries!

What is wrong here?

like image 648
AppleGrew Avatar asked Mar 10 '15 19:03

AppleGrew


1 Answers

After reading your question and the comments again, I understand what you are trying to say. Currently the SDK Manager does not have the Support v22 out.

You CAN download API 22 but you are NOT seeing support-v4. By the way, "${android_home}/extras/android/m2repository/support-v4" is the wrong directory.

The correct directory is: "${android_home}/extras/android/m2repository/com/android/support/support-v4".

Also, you must have it downloaded from your build.gradle, for example:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22 // <-- You need this
    buildToolsVersion '22.0.0' // <-- You need this

    defaultConfig {
        applicationId 'burrows.apps.example.admob'
        minSdkVersion 9
        targetSdkVersion 22 // <-- You need this
        versionCode 1
        versionName '1.0'
    }

    signingConfigs {
        debug {
            storeFile rootProject.file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    dexOptions {
        preDexLibraries = Boolean.valueOf(System.getProperty("pre-dex", "true"))
    }

    lintOptions {
        abortOnError false
    }
}

dependencies {
    compile project(':Lib-BurrowsApps')
    compile 'com.android.support:support-v4:22.0.0' // <-- You need this
    compile 'com.google.android.gms:play-services-ads:6.5.87'
}

Source: https://github.com/jaredsburrows/BurrowsAppsExamples/blob/master/Lib-BurrowsApps/build.gradle

Google's m2repository works just like the normal ~/.m2/repository/.

like image 61
Jared Burrows Avatar answered Nov 15 '22 17:11

Jared Burrows