0

In my app build.gradle

compileSdkVersion 23
minSdkVersion 16
targetSdkVersion 23
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'

since API 24 cameout, I changed the targetSdkVersion to 24, but then the last 2 dependencies show the squiggly-red-underline (not happy with using lower version than targetSdkVersion), I could not find dependencies libraries that support API 24.

According to my understanding of Jim Mixon post, I did not expect this problem. How can it be fixed?

in my Android SDK Manager window where Packages are listed, under Tools, I have the first line "name:Android SDK Tools, API:"BLANK", Rev.:24.4, Status:Installed). is not that a SDK 24 being installed?

Community
  • 1
  • 1
Fred J.
  • 5,759
  • 10
  • 57
  • 106

2 Answers2

1

As mentioned by CommonsWare, the API or SDK version 24 is not available yet. If you want to change your build version (<= 23) and two dependencies, you can follow these steps:

1- click and right-click your project or module. Choose 'Open Module Setting' option.

enter image description here

2- In the list that can be viewed menu, you can your build version and just below the related API.

3- In the tab 'Dependencies' you can click the + button and add a dependency. choose option '1 Library Dependency'.

enter image description here

If your build version is < 23 you can manually add to your .gradle file example:

android {
    compileSdkVersion 19
    buildToolsVersion '19.1.0'

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 19
        versionCode 65
        versionName "2.4.1"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
dependencies {
    compile 'com.android.support:support-v4:19.1.0'
}

p.s.Sorry for English. It's not my native language

I hope it can help you =]

tmbs
  • 43
  • 6
  • in my Android SDK Manager window where Packages are listed, under Tools, I have the first line "name:Android SDK Tools, API:"BLANK", Rev.:24.4, Status:Installed). is not that a SDK 24 being installed? – Fred J. Oct 18 '15 at 20:29
0

since API 24 cameout

There is no API 24 at the present time.

How can it be fixed?

Do not refer to API levels that do not presently exist.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Reading your answer and after my initial shock, I now know API and Sdk are, two different things, I should have worded my question using Sdk and not API and still have a question. – Fred J. Oct 18 '15 at 17:10