Xcode 4.5 no such file or directory - libCordova.a

2019-02-05 14:01发布

clang: error: no such file or directory: '/Users/admin/Library/Developer/Xcode/DerivedData/__TESTING__-fzbkvdbnndieeagphtjhdndiyttl/Build/Products/Debug-iphoneos/libCordova.a'

How do I get this a missing libCordova.a ?

align top http://www.kerrydeaf.com/libCordova.a.png

UPDATE: For Simon Germain. align top http://www.kerrydeaf.com/update.png

UPDATE: For Simon Germain. I don't see "Identity and Type". I can see "Identity". I'm using xcode 4.5 align top http://www.kerrydeaf.com/id.png

align top http://www.kerrydeaf.com/update.png

UPDATE: For Simon Germain. I got the Identity.

align top http://www.kerrydeaf.com/cor.png

UPDATE: For Samuel

align top http://www.kerrydeaf.com/armv6.png

UPDATE: For Simon Germain - Architecture.

UPDATE: For james0n - armv.

align top http://www.kerrydeaf.com/new.png

UPDATE: For Simon Germain - Architecture.

UPDATE: For james0n - armv.

 Undefined symbols for architecture i386:
   "_OBJC_CLASS_$_CDVURLProtocol", referenced from:
       objc-class-ref in AppDelegate.o
   "_OBJC_CLASS_$_CDVViewController", referenced from:
       _OBJC_CLASS_$_MainViewController 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)

UPDATE: For james0n - Valid Architecture.

align top http://www.kerrydeaf.com/valid.png

UPDATE: It is now solved!!! make sure all armv7 and armv7s for ios 6 on all in xcode. It worked.

标签: xcode ios6
12条回答
贼婆χ
2楼-- · 2019-02-05 14:18

Also - make sure you don't have more than one PhoneGap Xcode project open at a time - I was getting conflicts between the two. "Workspace already open in another workspace" type of loop.

查看更多
乱世女痞
3楼-- · 2019-02-05 14:19

Download the Cordova installer from here http://phonegap.com/download. Make sure it is the same version that you are currently using (ex 2.0).

Then mount the dmg found in the ios directory.

Then run the .pkg installer.

Restart Xcode.

查看更多
干净又极端
4楼-- · 2019-02-05 14:26

Had (as many others) the same problem, here's what I did:

  1. Redid the Getting Started guide from Phonegap (including downloading and extracting the source again)
  2. Same problem with the HelloWorld app
  3. product - clean
  4. Changed both the 'HelloWorld' and 'CordovaLib'-project (so not the Targets) according to james0n's answer, settings:

Architectures: Standard (armv7, armv7s)

Build Active Architecture only: Yes

and then it magically worked, I think steps 3 and 4 did it however.

查看更多
冷血范
5楼-- · 2019-02-05 14:29

I fixed this by removing the armv6 and i386 architecture from Valid Architecture setting

查看更多
Summer. ? 凉城
6楼-- · 2019-02-05 14:31

For your project, set the build setting "Build Active Architecture Only" to yes.

(Maybe also set the the Architectures build setting to "Standard (armv7, armv7s)" for CordovaLib project.)

查看更多
等我变得足够好
7楼-- · 2019-02-05 14:32

In addition to several other suggestions & post, I found that I was experiencing this problem on my AdHoc builds only. Please note that I figured this out during debugging because if I set the Edit Scheme > Archive build configuration to "release" it would work OK, but if set to AdHoc it would give me a link error, telling me that this file could not be found:

/Users/jason/Library/Developer/Xcode/DerivedData/MommyNearest-ceourmykvgxdekbkmzenuvhcfnzk/Build/Intermediates/ArchiveIntermediates/MommyNearest/BuildProductsPath/Adhoc-iphoneos/libCordova.a

This was actually a good clue to what the problem was, which was that somehow the CordovaLib subproject did not have an AdHoc configuration (it had ONLY "Debug" and "Release" configurations).

Therefore, when building for an AdHoc release (to use with Testflight) it would not create a symlink for this file correctly. Once I added an "AdHoc" configuration to the CordovaLib subproject, this started working.

enter image description here

查看更多
登录 后发表回答