‘ld: warning: directory not found for option’

2018-12-31 16:57发布

When I'm building my Xcode 4 apps I'm getting this warning:

ld: warning: directory not found for option '-L/Users/frenck/Downloads/apz/../../../Downloads/Google Analytics SDK/Library'
ld: warning: directory not found for option '-L/Users/frenck/Downloads/apz/../Google Analytics SDK/Library'

But I do not have Google Analytics in my app, I deleted all of it how can I remove the error? And archiving an app gives me the error:

clang: error: no such file or directory: 'armv6'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

I've tried so many things but I'm still getting this error when I'm trying to make an .IPA file

标签: xcode
24条回答
琉璃瓶的回忆
2楼-- · 2018-12-31 17:38

I had to remove the references at:

  • Target
  • Build Settings
  • Framework Search Paths

enter image description here

Then the build was broken (expected). So I removed the Framework (FB SDK), re-added it and voila. No more errors or warnings. :)

查看更多
春风洒进眼中
3楼-- · 2018-12-31 17:42

The key for this type of error is to go into build settings and look at each of the search paths sections such as Library Search Paths, Framework Search Paths and possibly even Header Search Paths and clear out any of the paths that no longer apply that your app is having a hard time trying to find. Remove them and carry on good sir

查看更多
怪性笑人.
4楼-- · 2018-12-31 17:45

I use cocoa pods so for me, I quit Xcode and ran

pod install

again and reopened the project. This fixed everything!

查看更多
浅入江南
5楼-- · 2018-12-31 17:45

I found the reference which I had to remove at:

  • Target
  • Build Settings
  • Header Search Paths
查看更多
心情的温度
6楼-- · 2018-12-31 17:45

If this happens after you've added a Podfile to your project and run pod install, go to your project folder, you'll see a new file that has been created "{ProjectName}.xcworkspace" -- open that file in xcode

The pods that have been installed will be properly linked to your project in this file

查看更多
与风俱净
7楼-- · 2018-12-31 17:46

I got bit by what appears to be the same issue too (this time in XCode 5.0.2). In my case, what happened was XCode decided to escape the quotes already in the "Build Settings". So for example:

"$(SRCROOT)/../GoogleAdMobAdsSdkiOS-6.4.1"

became

\"$(SRCROOT)/../GoogleAdMobAdsSdkiOS-6.4.1\"

which caused the build to fail...

Once I removed the escapes on the quotes everything worked fine again. In addition, it would probably be best to remove the quotes altogether unless you need them.

查看更多
登录 后发表回答