Incorrect path for Pods.debug.xcconfig in Xcode?

2020-05-13 13:22发布

so I used Venmo/Synx on my Xcode project with CocoaPods, and it completely screwed everything up.

I was able to fix the Manifest.lock and Podfile.lock errors, but now I am getting this error:

The file “Pods.debug.xcconfig” couldn’t be opened because there is no such file. (/Users/user/GitHub/xxxxxx/Pods/Pods/Target Support Files/Pods/Pods.debug.xcconfig)

As you can see, the path is incorrect, as there is no Pods/Pods directory (there is one extra pod).

How can I fix this? I have only added PODS_ROOT to the user-defined variable, as that fixed my Podfile and Manifest.lock files.

Any help would be much appreciated!


Edit:

After adding PODS_ROOT, I get this when running pod install.

[!] The `Project [Debug]` target overrides the `PODS_ROOT` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

15条回答
我想做一个坏孩纸
2楼-- · 2020-05-13 13:28

I faced this issue when I upgraded/downgraded cocoapods between 1.6.x and 1.5.x. The following step fixed this error

1, go to project info tab

2, just under Deployment target, there is configurations field. change your configuration. In my case, there are 2 options

/Users/user/GitHub/xxxxxx/Pods/Pods/Target Support Files/Pods/Pods.debug.xcconfig

/Users/user/GitHub/xxxxxx/Pods/Target Support Files/Pods/Pods.debug.xcconfig

3, clean and build again.

查看更多
爷的心禁止访问
3楼-- · 2020-05-13 13:28

Try deleting the debug.xcconfig file and run pod install again. It solved my issue

查看更多
家丑人穷心不美
4楼-- · 2020-05-13 13:31

For me, changing Build system to Legacy in File -> workspace settings did the trick

查看更多
Deceive 欺骗
5楼-- · 2020-05-13 13:35

I had the same problem in Xcode 6.1.1. I did the following to solve it:

  1. Set the configuration file setting* "None" for the Pods related target.
  2. Close the .xcworkspace.
  3. run pod install again
  4. now open and build your .xcworkspace

*The configuration file setting is found by selecting the project (not the target) and then the Info tab.

查看更多
时光不老,我们不散
6楼-- · 2020-05-13 13:36

For me, this caused after I updated cocoapods. So, I downgraded and the build worked again.

To downgrade, first list of all your versions:

sudo gem list cocoapods

Then specify the you want to delete (for me was 1.8.4):

sudo gem uninstall cocoapods -v 1.8.4

Then, with 1.5.3 worked!

查看更多
疯言疯语
7楼-- · 2020-05-13 13:40

I had the same error while trying to build my project for the first time. This is how I resolved it:

  • pod deintegrate
  • sudo gem install cocoapods-clean
  • pod clean

Open the project and delete the “Pods” folder that should be red.

  • pod setup
  • pod install

Reopen and build the project, I think it's good to go!

查看更多
登录 后发表回答