Phonegap build fails with exit code 2

前端 未结 1 1172
日久生厌
日久生厌 2021-01-25 08:09

I just freshly installed phonegap and having this problem when I try to build the project with the following command ; \"phonegap build android\"



        
相关标签:
1条回答
  • 2021-01-25 08:33

    Well it is so annoying.
    In my app folder I did issue the following commands.

    set ANT_HOME=C:\apache-ant-1.9.4\
    set PATH=%PATH%;%ANT_HOME%\bin
    

    And then the phonegap command works as well. Simply ANT is not resolved unless I issue the aforementioned commands. It took hours to try ANT command work but no light at all. It is simply not working even though it is defined as env variable.

    Edit : If you also end up with the minSDK error each time you issue the phonegap build command ( which keeps happening for me right after I upgraded phonegap version to 5.0.0) , please keep in mind that editing manifest.xml wont make a difference because of the reason that it is edited back to its original form by the build command. What you need to do is to change the minSDK version in the www/config.xml file.

    0 讨论(0)
提交回复
热议问题