The file “Pods.xcconfig” couldn’t be opened because there is no such file

血红的双手。 提交于 2019-12-03 10:34:25

问题


How to solve this issue. I have downloaded the iOS project from the Git repo and when I try to build, it gives an error:

Check dependencies
The file “Pods.xcconfig” couldn’t be opened because there is no such file. (/Users/YoGesh/Desktop/Xy-3/Pods/Pods.xcconfig)
PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/YoGesh/Library/Developer/Xcode/DerivedData/Xy-bmwkojrwthnvzdfxthnxeqgesekm/Build/Intermediates/Xy.build/Debug-iphonesimulator/Xy.build/Script-C0451AB63D7F4B73830000BA.sh
    cd /Users/YoGesh/Desktop/Xy-3
    /bin/sh -c /Users/YoGesh/Library/Developer/Xcode/DerivedData/Xy-bmwkojrwthnvzdfxthnxeqgesekm/Build/Intermediates/Xy.build/Debug-iphonesimulator/Xy.build/Script-C0451AB63D7F4B73830000BA.sh

diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

回答1:


Restarting Xcode helped me. Pod update and install didn't help.




回答2:


I found a good hint inside the issues of CocoaPods on GitHub, try this:

  1. Close your project (better close Xcode completely)
  2. Open the Terminal inside your project and execute pod install
  3. Open your project again. If there are still errors clean your project ( Shift + cmd + K ), after this the errors should be gone.



回答3:


Go to your project directory from the terminal

run "pod update"




回答4:


Hey i had this same problem, I was getting the following error when running pod update however i didn’t realise the update wasn’t working.

$ pod update

Analyzing dependencies /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory

It was because I forgot to run "pod setup" after installing cocoapods. I ran pod setup from the terminal, followed it up with pod update (or pod install) and everything went to plan.




回答5:


Closing Xcode, pod update and pod install didn't help me.
I just ran the install cocoapods command again:

sudo gem install cocoapods

If you see error:

You don't have write permissions for the /usr/bin directory

Use next command:

sudo gem install cocoapods -n /usr/local/bin



回答6:


You may be using the Xcode default project file. After installing the framework through pod, you must use the generated xcworkspace in the project folder.

Example : SampleProject.xcworkspace.




回答7:


For those who want to solve this issue and tried to remove the cocoa pods from the project: 1. Open the project, on the left side there must be a folder named Pods 2. Delete the folder and the problem will be solved !!! Do not do this if you need cocoa pods




回答8:


I've experience a similar situation, for me, it's an error stop all the pods to be updated when I ran pod update.

Try to resolve the error and run pod update again, clean your project then try to build again.




回答9:


I Tried pod update command in terminal for the project, it did not fix the issue.

then I Tried pod install command for the same project, it installed all the pod dependencies and the project got indexed and all those type of issues got fixed.




回答10:


  1. close Xcode
  2. pod install
  3. open Xcode


来源:https://stackoverflow.com/questions/24569183/the-file-pods-xcconfig-couldn-t-be-opened-because-there-is-no-such-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!