添加平台的PhoneGap问题 [英] Phonegap issue on adding platform

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

问题描述

我是Phonegap的新用户。
我在我的mac上安装了phonegap。我已经安装了最新的xcode。
我遵循从
的指令 http://docs.phonegap.com/en/3.4.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide

I am new to Phonegap. I have installed phonegap on my mac. I have installed latest xcode also. I am following instruction from http://docs.phonegap.com/en/3.4.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide.

我成功运行

 $ cordova create hello com.example.hello "HelloWorld"
 $ cd hello

但是我运行 cordova平台添加ios 后会出现以下错误。

But after i run cordova platform add ios it gives following error.

    Krishnak:my-app krishnak$ cordova platform add ios
    Creating ios project...
    Unknown option: n
    Usage: head [-options] <url>...
        -m <method>   use method for the request (default is 'HEAD')
        -f            make request even if head believes method is illegal
        -b <base>     Use the specified URL as base
        -t <timeout>  Set timeout value
        -i <time>     Set the If-Modified-Since header on the request
        -c <conttype> use this content-type for POST, PUT, CHECKIN
        -a            Use text mode for content I/O
        -p <proxyurl> use this as a proxy
        -P            don't load proxy settings from environment
        -H <header>   send this HTTP header (you can specify several)

        -u            Display method and URL before any response
        -U            Display request headers (implies -u)
        -s            Display response status code
        -S            Display response status chain
        -e            Display response headers
        -d            Do not display content
        -o <format>   Process HTML content in various ways

        -v            Show program version
        -h            Print this message

        -x            Extra debugging output
    Cordova can only run in Xcode version 4.6 or greater.

Error: /Users/krishnak/.cordova/lib/ios/cordova/3.4.0/bin/create: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:112:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Krishnak:my-app krishnak$ 

我已经在我的电脑上安装了 xampp 服务器。我不知道如果xampp是问题。
请建议我如何解决这个问题。

I have already installed xampp server on my computer. I m not sure if xampp is the problem. Please suggest me how can i fix this problem.

推荐答案

问题可能与xampp。它可能由于路径环境,考虑编辑您的 .profile 并放置xampp二进制路径。

The issue may with xampp. It may due to the path environment, consider to edit your .profile and put the xampp binary path.

em>#export / PATH = / Applications / XAMPP / bin:$ PATH -

Or try to comment bin like # export /PATH=/Applications/XAMPP/bin:$PATH –

希望这有助于你。

这篇关于添加平台的PhoneGap问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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