iOS PhoneGap构建失败 [英] iOS PhoneGap Build Failure

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

问题描述

我是新的 PhoneGap iOS和Xcode。我有一个问题,我的应用程序在Android手机上工作很好。我可以在iOS模拟器中构建和运行应用程序,但当我归档它来测试设备上,我得到以下错误。

I am new to PhoneGap for iOS and Xcode. I am having an issue with my app that worked on Android phones just fine. I'm able to build and run the app in the iOS simulator but when I archive it to test on devices I get the error below. I've searched all over and cannot find something that works.

错误:

ld: warning: ignoring file /Users/danlehman/Library/Developer/Xcode/DerivedData/HelloWorld-ebkivbdaivqchkgycifnnpgixspn/Build/Intermediates/ArchiveIntermediates/HelloWorld/BuildProductsPath/Release-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (armv7s): /Users/danlehman/Library/Developer/Xcode/DerivedData/HelloWorld-ebkivbdaivqchkgycifnnpgixspn/Build/Intermediates/ArchiveIntermediates/HelloWorld/BuildProductsPath/Release-iphoneos/libCordova.a
Undefined symbols for architecture armv7s:
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
      _OBJC_METACLASS_$_MainViewController in MainViewController.o
  "_OBJC_CLASS_$_CDVViewController", referenced from:
      _OBJC_CLASS_$_MainViewController in MainViewController.o
  "_OBJC_CLASS_$_CDVURLProtocol", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)


推荐答案

我在iPhone 4S上建立了 Cordova 2.7 ,Xcode 5和iOS7类似的错误。我更改了一个设置,它已正确建立。

I was getting a similar error for Cordova 2.7, Xcode 5 and iOS7 building on iPhone 4S. I changed one setting, and it built correctly.

选择您的应用程序。
转到构建设置,然后转到有效架构
更改为:

Select your app. Go to Build Settings then Valid Architectures. Change to:

armv7

我之前的设置是:

arm64 armv7 armv7s

清理和构建。它似乎与 armv7s 有关。让它运行的一个副作用是状态栏是透明的,浮动在应用程序的顶部。这是另一个主题,并与iOS7相关。

Clean and build. It seems to be related to armv7s. One side effect of getting it running is that the status bar is transparent and floating on top of the app. That is another topic though, and related to iOS7.

这篇关于iOS PhoneGap构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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