How to set Android goals (SDK)?

I am new to cordova development. Before starting with cordova, I installed the Android SDK from the command line. Both JDK and Apache ant are also already installed. According to the cordova document, I checked the cord requirements as follows with the command cordova requirements. And it shows that the goal of Android is not set. How to fix it? without this, it will lead to the further development of the cordova.

C:\Users\Nav\Documents\cordova_dev\cordova\hello>cordova requirements

    Requirements check results for android:
    Java JDK: installed 1.8.0
    Android SDK: installed true
    Android target: not installed
    No android targets (SDKs) installed!
    Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-2.14.1\bin\gradle
    Error: Some of requirements check failed
+4
source share
2 answers

I suggest you update gradle. I use gradle 4.1 in January 2018

To set the goal of your Android project, you can run:

$ export ORG_GRADLE_PROJECT_cdvMinSdkVersion=21
$ cordova build android

doc: https://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html#setting-gradle-properties

... . :

$ android/tools/bin/sdkmanager "build-tools;21.0.0"

.

0

sdkmanager .
.

sdkmanager "platforms;android-26"

cordova requirements.
, :

Android target: installed android-26
0

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


All Articles