Error executing command 'ant' on Mac OS X 10.9 Mavericks when building for Android with PhoneGap/Cordova

后端 未结 7 1271
谎友^
谎友^ 2020-11-29 17:04

Today I tried PhoneGap/Cordova with Mac OS X Mavericks. Building for iOS went just fine, but building for Android wasn\'t without some guesswork.

I

7条回答
  •  爱一瞬间的悲伤
    2020-11-29 17:39

    You can install ANT through macports or homebrew.

    But if you want to do without 3rd party package managers, the problem can simply be fixed by downloading the binary release from the apache ANT web site and adding the binary to your system PATH.


    For example, on Mountain Lion, in ~/.bash_profile and ~/.bashrc my path was setup like this:

    export ANT_HOME="/usr/share/ant"
    export PATH=$PATH:$ANT_HOME/bin
    

    So after uncompressing apache-ant-1.9.2-bin.tar.bz2 I moved the resulting directory to /usr/share/ and renamed it ant.

    Simple as that, the issue is fixed.


    Note Don't forget to sudo chown -R root:wheel /usr/share/ant

提交回复
热议问题