Eclipse+phonegap android开发环境构建的问题

环境:Win8 x86 + Eclipse4.2.2 + phonegap 2.9.1

1. The connection to adb is down, and a severe error has occured.

不能连接到adb,找了一圈,最后发现是设置project的AVD设置不对。

Run -> Run Configurations... -> Android application -> project Name -> 右侧:target

选中你的AVD 并Apply应用。

2. PANIC: Could not open “xxx”

不能打开AVD文件

解决方案:Find the .android folder on your cpu. You can find it by going to Window -> Preferences -> Android -> Build, and see the "Default debug keystore:" path location.

找到你的“.android”文件夹位置,你可以通过以下步骤找到:“Window -> Preferences -> Android -> Build”,查看“Default debug keystore:”的路径

After you find it, move the .android folder to your user root directory - which may be "C:\Users\moumoumou\" in your case.

然后移动“.android”移动到你的用户根目录,如 "C:\Users\moumoumou\"

3. Node.js 设置代理proxy

 对于此种情况只需设置一下npm的环境变量就可以了,运行如下命令: 

npm config set proxy=http://192.168.56.1:808

就可以了,但是看官方的文档中明明有http_proxy、https_proxy两个变量,设置了却不起作用。

4. 用node.js安装phonegap时(npm install -g cordova),出错:npm ERR! Error: shasum check failed

npm install https://registry.npmjs.org/npm/-/npm-x.x.x.tgz

x.x.x用错误信息中的npm版本号替代,然后再npm install -g cordova

暂无评论

发表评论

您的电子邮件地址不会被公开,必填项已用*标注。

相关推荐