An error occurred during creation of android sub-p

2019-02-16 19:28发布

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

[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
   [error] An error occured during creation of android sub-project. Path not found

Phonegap is looking for "C:\Documents and Settings\corbg\.cordova\lib\android\cordova\3.0.0\bin\create". There is nothing under the directory "3.0.0". I installed cordova like this npm install -g cordova.

I have the some problem when I run cordova platform add android.

Did I missing something?

8条回答
仙女界的扛把子
2楼-- · 2019-02-16 20:23

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.

查看更多
老娘就宠你
3楼-- · 2019-02-16 20:24

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.

查看更多
登录 后发表回答