An error occurred during creation of android sub-project because a path is not found

前端 未结 8 1769
旧巷少年郎
旧巷少年郎 2021-01-12 02:31

I\'m trying to do phonegap build android and I have this message :

[phonegap] detecting Android SDK environment...
[phonegap] using the local en         


        
相关标签:
8条回答
  • 2021-01-12 03:01

    It was a problem with my proxy. Cordova create a .cordova directory and try to download something on the internet. The download did not work. Next time, it check if there is a .cordova directory. It don't try to redownload something because the directory exist and it show the error.

    I removed the .cordova directory and I solved my problems with proxy. Now, everythings works.

    0 讨论(0)
  • 2021-01-12 03:03

    In Windows machine you have to delete .cordova directory under C:\Users\user_name\

    0 讨论(0)
  • 2021-01-12 03:05

    Did you set your PATH variable? Sometimes this error occurs in Windows when the PATH variable is not set correctly to access "java" and "ant" exes. If you want to test if they are correctly set, you can simply execute both (from any folder in your command line):

    > java
    

    or

    > ant
    

    and both programs should be found.

    0 讨论(0)
  • 2021-01-12 03:06

    I had the exact same problem for a different reason. I had an old version of ant (1.7.1). At least version 1.8.2 is needed for the build to work.

    0 讨论(0)
  • 2021-01-12 03:07

    This is because you haven't installed ANT! download it from here and install it step by step https://ant.apache.org/manual/install.html

    Then running the last command it will install the dependencies needed.

    0 讨论(0)
  • 2021-01-12 03:08

    its either due to improper installation or no installation of ANT or JAVA. But moreover we need to add Android SDk and prepare Android Targets via SDK manager before going through this.

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