I just installed cordova in my computer in order to make android apps using javascript.
I ran this command after i created my project on D:\learn_cordova\firstApp :
cordova platform add android
The result was the following :
Using cordova-fetch for cordova-android@^8.0.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.ignacio.firstApp
Name: HelloWorld
Activity: MainActivity
Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.1.0
Installing "cordova-plugin-whitelist" for android
Everything looks correct, but when i run cordova requirements
in order to see what else do i need in order to make my first android app i get this result :
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
android: Command failed with exit code ENOENT Error output:
'android' is not recognized as an internal or external command,
operable program or batch file.
Gradle: installed C:\gradle\bin\gradle
Some of requirements check failed
AS it says android is not recognized as a command, i tried adding variables to PATH :
C:\Users\ignac\AppData\Local\Android\Sdk
C:\Users\ignac\AppData\Local\Android\Sdk\platform-tools
There is supposed to exist the C:\Users\ignac\AppData\Local\Android\Sdk\tools
folder according to this
post however that was written back in 2012.
When I type android
in cmd returns that the command does not exist
Prior to this, when running cordova platform list
I was getting an error about an inexistent file called
C:\Users\ignac\.config\configstore\cordova-config.json
And I saw a stackoverflow post which indicated that creating the file with '{}' as input should fix the problem, so i did that.