Search code examples
androidcordovajscriptnms

An error occured During creation of phonegap android sub project


I am trying to build a phonegap android,At that time i got a message that

[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
   [error] An error occured during craetion of android sub-projesct. creating cordova project for the android platform 

Please help me. Thanks in advance.


Solution

  • Seems ant binary missing in your path! In you install ant with npm like:

    sudo npm install -g ant

    Then just make symlink to bin folder what found in your $PATH like

    sudo ln -s /usr/local/lib/node_modules/ant/ant/bin/ant /usr/local/bin/ant