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

后端 未结 7 1268
谎友^
谎友^ 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:53

    The error message proved to be true as Apache Ant isn't in the path of Mac OS X Mavericks anymore.

    Bulletproof solution:

    1. Download and install Homebrew by executing following command in terminal:

      ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    2. Install Apache Ant via Homebrew by executing

      brew install ant

    Run the PhoneGap build again and it should successfully compile and install your Android app.

提交回复
热议问题