ionic cordova platform add android 

yizhichaodeMacBook-Pro:myappsvn yizhichao$  ionic cordova platform add android 

✖ cordova platform add android --save - failed!

[ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2

 

        Adding yargs project...

        Error: Your yargs platform does not have Api.js

        

1down vote

There seems to be an error with android@6.2.x and later. I had the same issue and using the below step was able to build my apk.

Do the following:

cordova platform remove android

Then add 6.1.2 specifically

cordova platform add android@6.1.2

Also found the following as an temporary workaround

cordova platform add android --nofetch

 

 

  ionic cordova platform --help

 

  Examples:

 

    $ ionic cordova platform 

    $ ionic cordova platform add ios

    $ ionic cordova platform add android

    $ ionic cordova platform rm ios

相关文章
相关标签/搜索