当我跑步时:
\n\npod outdated\nRun Code Online (Sandbox Code Playgroud)\n\n在 IOS 上确定是否有任何过时的 pod,我得到以下结果:
\n\n.... \n\nAnalyzing dependencies\nThe color indicates what happens when you run `pod update`\n<green> - Will be updated to the newest version\n<blue> - Will be updated, but not to the newest version because of specified version in Podfile\n<red> - Will not be updated because of specified version in Podfile\n\nThe following pod updates are available:\n- Flutter 1.0.0 -> 1.0.0 (latest version 1.3.300)\n- Protobuf 3.9.2 -> 3.9.2 (latest version 3.10.0-rc1)\nRun Code Online (Sandbox Code Playgroud)\n\n虽然 Flutter 1.0.0 版本(红色)目前在 IOS 上似乎没问题,有人可以建议我如何更新这个 Pod 吗?
\n\n我已经使用以下方法升级了 Flutter:
\n\n/Users/bob/Downloads/flutter/bin/flutter upgrade\nRun Code Online (Sandbox Code Playgroud)\n\n对于上面提到的 Pod 版本,上述命令似乎没有什么区别。我希望所有内容都是最新版本,但如果没有必要,了解这些信息也会有所帮助。
\n\n使用:
\n\n/Users/bob/Downloads/flutter/bin/flutter doctor -v\nRun Code Online (Sandbox Code Playgroud)\n\n揭示了:
\n\n[\xe2\x9c\x93] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G95, locale en-US)\n \xe2\x80\xa2 Flutter version 1.9.1+hotfix.2 at /Users/bob/Downloads/flutter\n \xe2\x80\xa2 Framework revision 2d2a1ffec9 (3 weeks ago), 2019-09-06 18:39:49 -0700\n \xe2\x80\xa2 Engine revision b863200c37\n \xe2\x80\xa2 Dart version 2.5.0\n\n\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 28.0.3)\n \xe2\x80\xa2 Android SDK at /Users/bob/Library/Android/sdk\n \xe2\x80\xa2 Android NDK location not configured (optional; useful for native profiling support)\n \xe2\x80\xa2 Platform android-28, build-tools 28.0.3\n \xe2\x80\xa2 Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)\n \xe2\x80\xa2 All Android licenses accepted.\n\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 11.0)\n \xe2\x80\xa2 Xcode at /Applications/Xcode.app/Contents/Developer\n \xe2\x80\xa2 Xcode 11.0, Build version 11A420a\n \xe2\x80\xa2 CocoaPods version 1.6.0\n\n[\xe2\x9c\x93] Android Studio (version 3.5)\n \xe2\x80\xa2 Android Studio at /Applications/Android Studio.app/Contents\n \xe2\x80\xa2 Flutter plugin version 39.0.3\n \xe2\x80\xa2 Dart plugin version 191.8423\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)\n\n[\xe2\x9c\x93] Connected device (1 available)\n \xe2\x80\xa2 iPhone 11 Pro Max \xe2\x80\xa2 08EB7508-34DE-4797-8F33-3DEE671742E4 \xe2\x80\xa2 ios \xe2\x80\xa2 com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)\n\n\xe2\x80\xa2 No issues found!\nRun Code Online (Sandbox Code Playgroud)\n
问题来自于 podhelper.rb 脚本 ( YOUR_PATH//flutter/packages/flutter_tools/bin/podhelper.rb)。它生成一个“假”Flutter.podspec 文件,但它硬编码 1.0.0 podspec。
通过编辑 podspec.rb (适用于 iOS 应用程序)的第 155-190 行,将 podspec 的 json 定义替换为您想要从 CocoaPods 存储库移至的版本(例如此处的 v2.5)来解决此问题。运行 pod update 就会更新到2.5。
脚本中的下一部分对于 macOS 应用程序会重复相同的错误,因此您可能需要重复第 193-228 行。
| 归档时间: |
|
| 查看次数: |
1868 次 |
| 最近记录: |