Build PhoneGap Environment Error Summary

Source: Internet
Author: User
Tags goagent android sdk manager

1.NPM install-g Cordova Installation failed

Using NPM domestic image

Image use Method (three ways any one can solve the problem, it is recommended to use the 1th or 3rd, will be configured to write dead, the next time the configuration is still):

1. Through the config command

NPM Config Set Registry https://registry.npm.taobao.org

NPM Info underscore (if configured correctly this command will have string response)

2. Command line designation

NPM--registry https://registry.npm.taobao.org Info underscore

3. Edit ~/.NPMRC Add the following:

Registry = https://registry.npm.taobao.org


In addition, online said that using Goagent agent, but not successful, should be feasible:

Open Goagent, the default proxy address is 127.0.0.1:8087

Set the NPM agent to point to

NPM Config set Https-proxy http://127.0.0.1:8087

Change HTTPS strict mode to False

NPM Config set Strict-ssl false


2. Failed to update ADT

Change the Hosts file to add the following

#Google主页

203.208.46.146 www.google.com

#这行是为了方便打开Android开发官网 don't seem to be able to open a VPN now.

74.125.113.121 developer.android.com

#更新的内容从以下地址下载

203.208.46.146 dl.google.com

203.208.46.146 dl-ssl.google.com

And in the Android SDK Manager, set Tools---options tick force https ... to HTTP, that is, enforce the use of HTTP links

3.ant compilation Error

Key exception: Class not found:javac1.8

The reason is that ant1.9 does not support jdk1.8, either change the ant version or change the JDK version

4. Missing Hello-cordovalib.jar

Cordova importing a project with Eclipse (with two projects Cordovaapp-cordovalib projects and user-created projects) after creating a new Android project

One of the cordovaapp-cordovalib projects is to use ant to build the jar for user engineering, and specify the build file path in the Cordovalib project's build file to ${sdk.dir}/tools/ant/ Build.xml, while ${sdk.dir} is env. Android_home, you need to add Android_home, the SDK directory for ADT, in the system environment variable. Recompile the Cordovalib project, then right-click Properties--android in the user project, add lib, select Cordovalib to

Build PhoneGap Environment Error Summary

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.