0

每当我清理project/ios文件夹然后尝试pod install它都会引发错误:

[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: ({repo-path}/ios/Flutter/Flutter.framework)

StackOverflow 和其他论坛中列出了一些解决方法。
其中一些:

  • 删除project/ios/Flutter/Flutter.framework,然后尝试pod install.

但它引发了另一个错误:

Analyzing dependencies
cloud_firestore: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
Downloading dependencies
Installing GoogleUtilities 7.2.0 (was 7.2.2)
Generating Pods project
Integrating client project
Pod installation complete! There are 10 dependencies from the Podfile and 28 total pods installed.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
4

1 回答 1

1

下面列出了最有用的解决方案:

  • 删除ios/Podfile.lock然后运行:
cd ios
pod install

如果它不起作用,那么,如果你遇到这样的新问题:

[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: ({repo-path}/ios/Flutter/Flutter.framework)

您应该尝试通过以下步骤修复它:

  • 去除那个ios/Flutter/Flutter.framework
  • cd ios
  • pod install

在我的情况下工作的方式:

我只是从头开始重新创建项目,然后替换.git/ lib/, pubspec... (使项目运行的基本目录和文件)

于 2021-02-20T06:46:40.997 回答