cordova platform add android not working while listing Android targets
To work, this cordova command needs to use some programs located into your sdk/tools
directory. You need also have installed apache ant.
Then you must add these directories into your PATH
system variable:
Background:
- let's assume you have installed your Android SDK to the
c:\sdk\android
directory - you have installed you Apache ant to the
c:\tools\apache-ant
directory
Then you must create two system variables:
ANDROID_HOME
with thec:\sdk\android
valueANT_HOME
with thec:\tools\apache-ant
value
Finally, you must modify the PATH
variable and add those two to the end of the PATH
' value:
;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
NOTE: for those who uses Linux, the instruction differs a bit.
More documentation available here.
Info about 'cordova platform add android' command
There is no relationship between them
When you add the platform with a version you specify a cordova-android version from the released ones. If you don't specify one, it will install the version pinned on the Cordova CLI (or higher patch version if available). Again, the Cordova CLI version has no relationship with cordova-android version or Android targeted version.
cordova-android uses semver for it's versions, that is, major.minor.patch
When there is a breaking change, the first number is changed, and changing the target SDK is not always a breaking change.
All the platform updates are announced on the Cordova blog, make sure you read it frequently so you can be informed of new CLI, platforms and plugins releases
Cordova: Error adding android platform
I think this issue because of .npmrc in your home directory, just remove it and everything should work
Cordova - add android platform issue
change
%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;
to
%ANDROID_HOME%;
Cordova Platform add android issues
ANDROID_HOME should point to \sdk
, not \sdk\platform-tools\
. This is because the build system uses things in both platform-tools and tools folders. Change that and try again in a new terminal window please.
Related Topics
How to Read Text File in Android
Wallpaper Not Properly Fit on Device Screen
Opencv Android Green Color Detection
How to Display Fetched JSON Data into Listview Using Baseadapter
Why Can't One Add/Remove Items from an Arrayadapter
Android Change Text Color of Items in Spinner
Writing Text File to Sd Card Fails
Firebase Sort by Points Depending on Date
How to Use Broadcast Receiver in Different Applications in Android
Converting Preview Frame to Bitmap
How to Use Sharedpreferences to Save More Than One Values
How to Call One Android Application from Another Android Application
Cannot Call Getsupportfragmentmanager() from Activity
Android: Skimagedecoder:: Factory Returned Null
Android Downloadmanager Progress
Android: Sample Code to Connect to Vpn in Android 4.0 Using Vpnservice API