Phonegap/Cordova build android node_modules/q/q.js throw e;

前端 未结 8 2130
长情又很酷
长情又很酷 2020-12-09 08:50

cordova build android gives me the following err

node_modules/q/q.js:126 throw e; (*error details)

This question has been asked before, but

8条回答
  •  情话喂你
    2020-12-09 09:35

    I banged my head against the wall for hours and hours and ultimately came up with a simple solution. I went into the project directory and issued two commands:

    cordova platform remove android
    cordova platform add android
    

    Recompiled with "cordova build android" and it worked like a charm.

    I think cordova wanted to possibly update some files.

    ===== Update for Ionic ========

    In case you are using ionic framework then these are the commands for your rescue:

    ionic platform remove android
    ionic platform add android
    

    I have noticed that this normally happens when you break (Ctrl-C) the compilation process.

提交回复
热议问题