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

I'm new to Android development tools, and I'm going to try cordova to develop an Android application using web technologies, but when I use the cord command requirements, the result is

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 android studio, the default API is android-27, and I don't know how to add the android-26 API. Please, help.

+17
source share
3 answers

Android Studio on macOS has the platform settings in the settings ...> Appearance and behavior> System Settings> Android SDK> SDK Platform tab. Verification of Android 8.0 (Oreo) with API level 26 and clicking the "Apply" button, install the package, and now the requirements verification proceeds 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.

+23
source

Another option from the terminal:

go to: "C: \ Users \ USERNAME \ AppData \ Local \ Android \ Sdk \ tools \ bin"

 sdkmanager "platform-tools" "platforms;android-26" 

as stated here: https://developer.android.com/studio/command-line/sdkmanager

+5
source

When using Ionic Cordova (Ionic 3), the plug-in: cordova-plugin-ionic-webview now includes the Android target during installation.

in config.xml:

 <plugin name="cordova-plugin-ionic-webview" spec="^2.2.0"> <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" /> </plugin> 

in package.json:

 "cordova-plugin-ionic-webview": { "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" } 

When adding the Android platform:

 > cordova platform add android --save Using cordova-fetch for cordova-android@ ~7.1.1 Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.packageName.projectName Name: Project Name Activity: MainActivity Android target: android-27 
0
source

Source: https://habr.com/ru/post/1273059/


All Articles