Workaround Ordova cteate app download failed to create successfully

Source: Internet
Author: User

Use the following statement to create a Cordova application:

The code is as follows Copy Code
cordova-d Create Lzwmeapp Com.lzw.lzwmeapp Lzwmeapp

However, it was not possible to create it successfully, prompting an error as follows:

  code is as follows copy code
e:lzwme_app_ ANDROID>CORDOVA-D Create Lzwmeapp
Creating a new Cordova project with Name "Hellocordova" and ID Io.cordova.hello
Cordova "at location" E:lzwme_app_androidlzwmeapp "
Using the stock Cordova Hello-world application.
Requesting {"uri": "Https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-w
orld.git;a=snapshot;h=3.4.0 ; sf=tgz "} ...
Downloading Cordova library for www ...
Error:connect etimedout
at Errnoexception (net.js:904:11)
at object.afterconnect [as OnComplete] (net.js:89 5:19)

Obviously this is the download Cordova Hello World file failed. The main reason for the URL https://git-wip-us.apache.org/speed is too slow, easy timeout.
Workaround:
We can change the download address for this file by:
Open the Platforms.js file in the Cordova directory and modify the URL configuration address. Here can be modified for git attachment package download address, specific to the official GitHub find:
https://github.com/apache/
such as the main modified here is the following section of code:

The code is as follows Copy Code
' Android ': {
Parser: './src/metadata/android_parser ',
URL: ' Https://git-wip-us.apache.org/repos/asf?p=cordova-android.git ',
URL: ' https://github.com/apache/cordova-android/archive/3.4.0.tar.gz? ',
Version: ' 3.4.0′
},
' www ': {
Hostos: [],
URL: ' Https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git ',
URL: ' https://github.com/apache/cordova-app-hello-world/archive/3.4.0.tar.gz? ',
Version: ' 3.4.0′
}

Other parts of the URL can also refer to the modification.
Of course, you can also manually download the corresponding compression package, put it on the local server, and then modify the corresponding file to download the address.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.