Cocoapods 似乎安装了错误的 pod 版本。
这是我的 pubspec.yaml
中的示例行:
webview_flutter: ^1.0.7
运行 pod install
时,我看到的是:
Installing webview_flutter (0.0.1)
在我的 flutter/.pub_cache/hosted/pub.dartlang.org/
中,我只看到以下版本:
webview_flutter-0.3.24
webview_flutter-1.0.7
使用 XCode 构建时,我从 webview_flutter
收到一些警告,指出正确的 1.0.7
版本,因此尽管 cocoapods 输出,似乎正在使用正确的 pod。然而,这确实令人困惑。任何解决此问题的想法将不胜感激。
我尝试过重新安装 cocoapods、分解 pod 并重新构建、清理、更新 pod repo、删除 Podfile.lock 等常见的嫌疑人。
这是我的环境:
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-FI)
• Flutter version 1.22.5 at /Users/ilonamooney/Documents/dev/flutter
• Framework revision 7891006299 (10 days ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/ilonamooney/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/ilonamooney/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
• CocoaPods version 1.10.0
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (1 available)
• Ilona’s iPhone (mobile) • a12e6e165529c7307dfdb723f37e02f3901f17d0 • ios • iOS 14.2```