PhoneGap的3不与Android的工作室工作 [英] Phonegap 3 doesn't work with Android Studio

查看:177
本文介绍了PhoneGap的3不与Android的工作室工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎很简单,但我不能这样做的。

It seems rather simple to me, but I can't do it at all.

我有 NPM安装-g的PhoneGap 的一切成功和安装PhoneGap的。

I have npm install -g phonegap with everything successful and installing phonegap.

我跟从这里 http://phonegap.com/install/ 我已经然后创建说明我项目:

I have followed instructions from here http://phonegap.com/install/ i have then created my project:

C:\var\www\sexdiaries.co.uk>phonegap create sexdiaries -n SexDiaries -i co.uk.sexdiaries.app

我有话,因为告诉这里想跑的Andr​​iod但有下列错误

I have then, as told Here tried to run andriod but with the following errors

C:\var\www\sexdiaries.co.uk\sexdiaries>phonegap run andriod

C:\Users\Hutber\AppData\Roaming\npm\node_modules\phonegap\lib\phonegap\run.js:72
    self.phonegap.emit('log', 'detecting', platform.human, 'SDK environment...
                                                   ^
TypeError: Cannot read property 'human' of undefined
    at RunCommand.execute (C:\Users\Hutber\AppData\Roaming\npm\node_modules\phonegap\lib\phonegap\run.js:72:52)
    at RunCommand.run (C:\Users\Hutber\AppData\Roaming\npm\node_modules\phonegap\lib\phonegap\run.js:55:10)
    at PhoneGap.run (C:\Users\Hutber\AppData\Roaming\npm\node_modules\phonegap\lib\phonegap\util\command.js:28:25)
    at CLI.module.exports [as run] (C:\Users\Hutber\AppData\Roaming\npm\node_modules\phonegap\lib\cli\run.js:38:14)
    at CLI.module.exports [as argv] (C:\Users\Hutber\AppData\Roaming\npm\node_modules\phonegap\lib\cli\argv.js:66:17)
    at Object.<anonymous> (C:\Users\Hutber\AppData\Roaming\npm\node_modules\phonegap\bin\phonegap.js:24:21)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

更多了,我已经导入创建到的Andr​​iod Studio中的项目,但是这样做的时候,我得到:的源文件为您的项目没有发现

我知道如何创建一个使用PhoneGap的2.9工作项目。但不知道是什么3捧出?

I know how to create a working project using phonegap 2.9. But can't work out what 3 is offering?

所以现在的问题,我如何真正得到一个工作本地Android应用程序使用phoengap 3个工作

So the question, how do I actually get a working local android app working using phoengap 3

推荐答案

当必须挖我发现如何突破这个:

Upon must digging I found how to get past this:

phonegap run android

它的那样简单。

Its as simple as that.

您需要添加的平台一起工作,而文档所以非常非常差:

You need to add platform to work with, whilst the documentation is so very very poor:

C:\var\www\sexdiaries.co.uk\sexdiaries>phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
 [warning] missing library cordova/android/3.0.0
[phonegap] downloading https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=snapshot;h=3.0.0;sf=tgz...
[phonegap] compiling Android...
[phonegap] successfully compiled Android app

那你是好去,做一个导入与Andriod的工作室也将现在的工作,你有一个项目一起工作:)

Then you are good to go, doing an import with Andriod Studio will also work now as you have a project to work with :)

太棒了。

这篇关于PhoneGap的3不与Android的工作室工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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