PhoneGap的构建Android - 错误"添加了Android平台" ENOENT [英] Phonegap Build android - error "Adding the android platform" ENOENT

查看:106
本文介绍了PhoneGap的构建Android - 错误"添加了Android平台" ENOENT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直升机, 目前我正在试图构建一个会被自动创建的基本phonegapp Android应用程序,所以我浏览到目录...但是当我使用命令

Helo, I am currently trying to build the base phonegapp android app that's automatically created, so I navigated to the directory... but when I use the command

phonegap build android

我刚刚得到这个随机误差,如图所示attatched图片。

I just get this random error, as shown in the attatched picture.

额外的信息

我目前在Windows 8上,和我完全新的制作应用程序,并且是新的命令行也是如此。不是很熟悉的东西...

I am currently on Windows 8, and am completely new to making apps, and am new to the command line as well. Not very familiar with this stuff...

我想要做的就被称为编译什么,对吧?

What I'm trying to do would be called 'compiling', right?

推荐答案

是啊,我有同样的问题昨天 - 但有一个同事有点帮助我得到了它

Yeah, I had the same problem yesterday - but with a little help of a colleague I got it!

  1. 在安装节点JS
  2. 使用命令行安装的PhoneGap: NPM安装-g的PhoneGap
  3. 在安装的Andr​​oid SDK
  4. 在推出Android SDK管理器并安装Android 4.4.2(API19)
    • 由于最新的PhoneGap /科尔多瓦版本需要这种
    • 文档的Andr​​oid SDK和SDK平台要足够
    • 同时更新现有的软件包
  1. Install node js
  2. Install phonegap using command line: npm install -g phonegap
  3. Install Android SDK
  4. Launch Android SDK Manager and install Android 4.4.2 (API19)
    • Because latest phonegap/cordova version requires this
    • Documentation for Android SDK and SDK Platform should be enough
    • Also update already existing packages
  • <$c$c>%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%JAVA_HOME%\bin
  • 在每个文件夹都用分号隔开

设置环境变量都将生效,只是新的命令行窗口。所以,你应该重新打开,整个过程后。

Setting environment variables will take effect just for new command line windows. So you should reopen it, after the whole process.

很简单,不是吗? ; - )

Easy, isn't it? ;-)

现在,您可以使用的PhoneGap构建Android 您已经创建了一个新的PhoneGap项目之后。通过USB如果你有你的智能手机插入并安装了USB驱动程序,并激活了USB调试的智能手机,您可以使用

Now you can use phonegap build android after you've created a new phonegap project. If you have your smartphone plugged via USB and installed the USB drivers, and activated the USB Debugging on smartphone, you may use

PhoneGap的运行Android

和准备构建APK将被转移,并在智能手机上运行。完美的测试。

And the ready build APK will be transfered and executed on your smartphone. Perfect for testing.

如果你想创建一个最终版本APK,去 YO​​URPROJECT \平台\机器人\蚂蚁构建 并输入蚂蚁发布。 你会发现最后的APK在 YO​​URPROJECT \平台\机器人\ BIN

If you want to create a final release APK, go to YOURPROJECT\platforms\android\ant-build and enter ant release. You'll find the final APKs in YOURPROJECT\platforms\android\bin.

他们是无符号的,这里是一个新手上路指南签署APK

They are unsigned, here is a Noob guide to signing an APK.

我测试了吧code扫描仪为例,它工作的无缝连接。

I have tested a Barcode Scanner example, and it works seamlessly.

玩得开心!

这篇关于PhoneGap的构建Android - 错误&QUOT;添加了Android平台&QUOT; ENOENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆