当“仅构建活动体系结构"为否时,Cordova链接器错误“未为要构建的文件构建文件,而不是链接的体系结构(i386)". [英] Cordova linker error when Build Active Architecture Only is No "file was built for archive which is not the architecture being linked (i386)"

查看:94
本文介绍了当“仅构建活动体系结构"为否时,Cordova链接器错误“未为要构建的文件构建文件,而不是链接的体系结构(i386)".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Mac Yosemite中使用最新的Cordova版本,并使用命令行工具执行了以下操作

I am using the latest Cordova version in Mac Yosemite, using command line tools did the following

cordova创建xxxx com.xxxx xxxx

cordova create xxxx com.xxxx xxxx

cd xxxx

cordova平台添加ios

cordova platform add ios

现在我在平台下打开xcode项目文件,并打开xcode 6

now I open the xcode project file under platform and xcode 6 opens up

然后我去构建设置->仅构建活动架构->否

I then go to Build Setting -> Build Active Architecture Only -> No

现在,我运行示例准系统科尔多瓦应用程序,它会引发一堆链接器错误

Now I run the sample barebone cordova App and it throws a bunch of linker errors

ld: warning: ignoring file /Users/joelasirvathamjesudoss/Library/Developer/Xcode/DerivedData/xxxx-ehdvqzsskcnwbncktgdnuqbbnloq/Build/Products/Debug-iphonesimulator/libCordova.a, file was built for archive which is not the architecture being linked (i386): /Users/joelasirvathamjesudoss/Library/Developer/Xcode/DerivedData/xxxx-ehdvqzsskcnwbncktgdnuqbbnloq/Build/Products/Debug-iphonesimulator/libCordova.a
Undefined symbols for architecture i386:
  "_CDVLocalNotification", referenced from:
      -[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o
  "_CDVPluginHandleOpenURLNotification", referenced from:
      -[AppDelegate application:openURL:sourceApplication:annotation:] in AppDelegate.o
  "_CDVRemoteNotification", referenced from:
      -[AppDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:] in AppDelegate.o
  "_CDVRemoteNotificationError", referenced from:
      -[AppDelegate application:didFailToRegisterForRemoteNotificationsWithError:] in AppDelegate.o
  "_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from:
      _OBJC_CLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_CLASS_$_CDVCommandQueue", referenced from:
      _OBJC_CLASS_$_MainCommandQueue in MainViewController.o
  "_OBJC_CLASS_$_CDVViewController", referenced from:
      _OBJC_CLASS_$_MainViewController in MainViewController.o
  "_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from:
      _OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_METACLASS_$_CDVCommandQueue", referenced from:
      _OBJC_METACLASS_$_MainCommandQueue in MainViewController.o
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
      _OBJC_METACLASS_$_MainViewController in MainViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

但是当我更改构建设置"->仅构建活动体系结构"->是"时 一切正常.

But when I change Build Setting -> Build Active Architecture Only -> Yes Everything works fine.

现在,我知道在提交给App Store Build Active Architecture时,应该只为否.

Now I know while submitting to App Store Build Active Architecture Only should be No.

所以请告诉我我要去哪里了

So please advice where I am going wrong

设置如下所示 预先感谢

Settings look like the following Thanks in advance

推荐答案

能否请您确认您的设置如下所示?

Can you please confirm your setting looks like this ?

这篇关于当“仅构建活动体系结构"为否时,Cordova链接器错误“未为要构建的文件构建文件,而不是链接的体系结构(i386)".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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