phonegap build ios异常与HelloWorld应用程序 [英] phonegap build ios exception with HelloWorld Application

查看:144
本文介绍了phonegap build ios异常与HelloWorld应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用PhoneGap构建一个helloWorld应用程序,但似乎是试图找到.xcodeproj文件两次。



phonegap版本:3.3.0-0.18 .0



cordova版本:3.3.1-0.1.2

  $ phonegap build ios 
[phonegap]检测iOS SDK环境...
[phonegap]使用本地环境
[phonegap]编译iOS ...
[错误]构建ios project.xcodebuild时出错:错误:'HelloWorld.xcodeproj.xcodeproj'不存在。
xcodebuild:error:'HelloWorld.xcodeproj.xcodeproj'不存在。
xcodebuild:error:'HelloWorld.xcodeproj.xcodeproj'不存在。

当从XCode IDE构建和运行时,它可以正常工作。

解决方案

在我的例子是grep输出,这是混乱的构建脚本。



尝试在构建之前运行以下命令

  export GREP_OPTIONS = -  color = never






Backstory



问题的来源是 platforms / ios / cordova / build 脚本:



我的本​​地环境包含:

  export GREP_COLOR ='1; 37; 40'
export GREP_OPTIONS = - color = always
/ pre>

..这会产生漂亮的grep输出,但它使上述脚本混淆,正是在这一行:

  XCODEPROJ = $(ls$ PROJECT_PATH| grep .xcodeproj)
PROJECT_NAME = $(basename$ XCODEPROJ.xcodeproj)

永久修复会涉及到将行更改为:

  XCODEPROJ = $(ls$ PROJECT_PATH| grep --color = never .xcodeproj)
PROJECT_NAME = $(basename$ XCODEPROJ.xcodeproj)

干杯!


I am trying to build a helloWorld application using PhoneGap but it seems that is trying to find the .xcodeproj file twice.

phonegap version: 3.3.0-0.18.0

cordova version: 3.3.1-0.1.2

$ phonegap build ios
[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] compiling iOS...
   [error] An error occurred while building the ios project.xcodebuild: error: 'HelloWorld.xcodeproj.xcodeproj' does not exist.
xcodebuild: error: 'HelloWorld.xcodeproj.xcodeproj' does not exist.
xcodebuild: error: 'HelloWorld.xcodeproj.xcodeproj' does not exist.

It works fine when I build and run from the XCode IDE.

解决方案

In my case it was grep output which was confusing the build script.

Try running the following command just before build or run:

export GREP_OPTIONS="--color=never"    


Backstory

Source of the problem is in platforms/ios/cordova/build script:

My local environment contains:

export GREP_COLOR='1;37;40'
export GREP_OPTIONS="--color=always"

.. which produces nice colored grep output, but it is confusing the above script, exactly at this line:

XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj  )
PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)

A permanent fix would involve changing the line to something like:

XCODEPROJ=$( ls "$PROJECT_PATH" | grep --color=never .xcodeproj  )
PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)

Cheers!

这篇关于phonegap build ios异常与HelloWorld应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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