更新我的 pod 导致 GoogleDataTransport Umbrella 标头出错

Alg*_*san 36 ios cocoapods swift

我刚刚使用“pod update”命令更新了我的 pod,我使用了 Firebase pod。我添加了新的 pod,然后当我编译我的项目时,出现了几个错误,如下所示:

- Umbrella header for module 'GoogleDataTransport' does not include header 'GDTEventDataObject.h'
- Umbrella header for module 'GoogleDataTransport' does not include header 'GDTClock.h'
...
...
Run Code Online (Sandbox Code Playgroud)

我 - 使用 swift5 - Xcode 11.0 - macOS 10.15

Pau*_*ien 77

rm -rf ~/Library/Developer/Xcode/DerivedData/
pod deintegrate
pod update
Run Code Online (Sandbox Code Playgroud)

GoogleDataTransport引用从旧版本荚缠绵

  • 我是新手,但这个建议对我有用:````flutter clean````然后````flutter run```` (3认同)

小智 56

添加保罗的回答:我还必须清除我的 Pod 缓存。

rm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
pod deintegrate
pod update
Run Code Online (Sandbox Code Playgroud)

如果您正在使用 Flutter,您可能也想对 Flutter 进行清理。

flutter clean
Run Code Online (Sandbox Code Playgroud)

  • 对于 flutter,flutter clean 是必要的,否则即使运行之前的命令也会出现相同的错误 (4认同)

小智 17

这对我有用

# clear cached artifacts/dependencies
rm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
rm -rf clone/ios/Pods/
pod cache clean --all

# clear flutter - skip the next 3 lines if you're not using flutter
flutter clean
flutter pub get
cd ios

# run pod install
rm Podfile.lock
pod install --repo-update
Run Code Online (Sandbox Code Playgroud)