0

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.

Ignacio Ambía
  • 479
  • 5
  • 16
  • Your link clearly states C:\Users\Parag Jain\AppData\Local\Android\sdk\tools C:\Users\Parag Jain\AppData\Local\Android\sdk\build-tools but you didn't do that – Eric Apr 12 '20 at 13:04
  • As I mentioned in the question section, the 'tools' folder didn't exist, so I downloaded it from somewhere else and put it in the correct place, after deleting all of the path variables I created and creating new ones, I was able to build the apk, however i am still unable to run the emulator. When i open android studio & try to run an emulation it tells me that there is an error with my ANDROID_SDK_ROOT path variable – Ignacio Ambía Apr 12 '20 at 14:51

0 Answers0