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
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.
If using Ionic Cordova(Ionic 3), the plugin:cordova-plugin-ionic-webview
now includes the Android target when installed.
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 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
Another option from the terminal:
go to: "C:\Users\YOU-USER-NAME\AppData\Local\Android\Sdk\tools\bin"
sdkmanager "platform-tools" "platforms;android-26"
as listed here: https://developer.android.com/studio/command-line/sdkmanager