• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

android-26 or android-27 in Sdk

I am an extreme beginner, I downloaded Android Studio yesterday, and fired it up for the first time this morning. I followed the tutorial 'Create an Android Project' and fell at the first fence. It loaded up the API and gave the gradle message "Failed to find target with hash string 'android-26' in C:\Users\User\AppData\Local\Android\Sdk"
The directory named has several subfolders called android-27, and even a reference to these in a file jdk.table.xml.
This suggests to me that part of the package has been updated to android-27, without telling the other part, which is still living in android-26. I presume that this is the most recent update, since I downloaded it yesterday. Is there anything I can do apart from wait for an update?
 
The is two thing target sdk and minimum allowable sdk .
The higher sdk you have the more allowed tools but if the minimum sdk does not support this feature it won't work but the app won't crash so as you go with higher sdk you will find new tools to use like instant app and many other features .
In my app the target is 26 but the minimum is 19 so you make this consideration at work
Here is my app if you want to try
https://play.google.com/store/apps/details?id=com.qren&hl=en
 
Look in your build.gradle file. There will be something like this.

Code:
android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.lv426.myapplication"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
}

Usually Android Studio is very good at downloading stuff it needs to build. So the error message should have some sort of link you can click on to get Android Studio to download and install any required artefacts, like SDKs.
 
No need to set the minimum to 15 .
19 is good to make the app support 4.3 + version .
I think that you won't find any one the internet with less than 4.2 versoin
 
No need to set the minimum to 15 .
19 is good to make the app support 4.3 + version .
I think that you won't find any one the internet with less than 4.2 versoin

I'm not suggesting he should set minmum SDK to 15. I was just giving that as an example of what to look for in the build.gradle.
 
Back
Top Bottom