相关疑难解决方法(0)

如何使用Phonegap向项目添加平台

我想使用phonegap 3为我的项目添加Android支持.

我运行了以下命令:

phonegap -v 
     3.0.0-0.14.3
phonegap create Hello com.mycompany.hello Hello
cd Hello
phonegap platform add android
   [error] 'platform add android' is not a /usr/local/bin/phonegap command. See '/usr/local/bin/phonegap help'
Run Code Online (Sandbox Code Playgroud)

我对1.0版到2.9版的PhoneGap非常熟悉,但这次我迷路了.

android cordova

2
推荐指数
1
解决办法
4060
查看次数

Phonegap 3不适用于Android Studio

这对我来说似乎相当简单,但我完全不能这样做.

我有npm install -g phonegap一切成功和安装phonegap.

我已按照此处的说明http://phonegap.com/install/然后我创建了我的项目:

C:\var\www\sexdiaries.co.uk>phonegap create sexdiaries -n SexDiaries -i co.uk.sexdiaries.app
Run Code Online (Sandbox Code Playgroud)

我有,然后告诉这里试图运行andriod但有以下错误

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)
Run Code Online (Sandbox Code Playgroud)

更重要的是,我已经将创建的项目导入到Andriod Studio中,但是当我这样做时,我得到: Source files for your project not found …

android cordova android-studio

1
推荐指数
1
解决办法
6402
查看次数

标签 统计

android ×2

cordova ×2

android-studio ×1