Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add android target / API android-26 in android studio?

Tags:

I am new in android development tools and I'm about to try cordova to develop android app using web technologies, but when i use the comand cordova requirements the result is this

Requirements check results for android: Java JDK: installed 1.8.0 Android SDK: installed true Android target: not installed Please install Android target / API level: "android-26".  Hint: Open the SDK manager by running: "C:\Users\json\AppData\Local\Android\sdk\tools\android.bat" You will require: 1. "SDK Platform" for API level android-26 2. "Android SDK Platform-tools (latest) 3. "Android SDK Build-tools" (latest) Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.1\bin\gradle 

When i installed the android studio the default API is android-27 and i dont know how to add android-26 API. Please help.

like image 912
white-comet Avatar asked Nov 01 '17 16:11

white-comet


People also ask

How do I update my target API level in Android Studio?

Step 1: Open your project in Android mode then go to Gradle Scripts > build. gradle(Module: app) as shown in the following image. Step 2: Refer to the below image and here you have to change the minSdkVersion and targetSdkVersion as per the requirement.

How do I change my target API?

Step 1: Open your Android Studio, and go to Menu. File >Project Structure. Step 2: In project Structure window, select app module in the list given on left side. Step 3: Select the Flavors tab and under this you will have an option for setting “Min Sdk Version” and for setting “Target Sdk Version”.


1 Answers

Android Studio on macOS has platform settings at Preferences... > Appearance & Behavior > System Settings > Android SDK > SDK Platform tab. Checking Android 8.0 (Oreo) having the API level 26 and clicking Apply installed the package and now the requirements check passes as follows:

Requirements check results for android: Java JDK: installed 1.8.0 Android SDK: installed true Android target: installed android-27,android-26 Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle 

Hope this works on Windows as well.

like image 130
kazutomi Avatar answered Oct 22 '22 06:10

kazutomi