Flutter 升级3.22.3相关报错问题

Analyzing dependencies
firebase_analytics: Using Firebase SDK version '10.29.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '10.29.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.29.0' defined in 'firebase_core'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin23/rbconfig.rb:21: warning: Insecure world writable dir /opt/homebrew/bin in PATH, mode 040777
Run script to upload symbols already exists.
firebase_crashlytics: Using Firebase SDK version '10.29.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.29.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "firebase_analytics":
  In Podfile:
    firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)

Specs satisfying the `firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)` dependency were found, but they required a higher minimum deployment target.
flutter update-packages --force-upgrade
Building flutter tool...
Resolving dependencies... (6.8s)
Downloading packages... 
Got dependencies.
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:48:10: Error: Type 'DryRunResult' not found.
  Future<DryRunResult> dryRun({
         ^^^^^^^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:127:10: Error: Type 'DryRunResult' not found.
  Future<DryRunResult> dryRun({
         ^^^^^^^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:754:37: Error: Type 'DryRunResult' not found.
void ensureNativeAssetsBuildSucceed(DryRunResult result) {
                                    ^^^^^^^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:123:26: Error: The getter 'packagesWithNativeAssets' isn't defined for the class 'PackageLayout'.
 - 'PackageLayout' is from 'package:native_assets_builder/src/package_layout/package_layout.dart' ('../../../.pub-cache/hosted/pub.flutter-io.cn/native_assets_builder-0.8.1/lib/src/package_layout/package_layout.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'packagesWithNativeAssets'.
    return packageLayout.packagesWithNativeAssets;
                         ^^^^^^^^^^^^^^^^^^^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:137:25: Error: The method 'dryRun' isn't defined for the class 'NativeAssetsBuildRunner'.
 - 'NativeAssetsBuildRunner' is from 'package:native_assets_builder/src/build_runner/build_runner.dart' ('../../../.pub-cache/hosted/pub.flutter-io.cn/native_assets_builder-0.8.1/lib/src/build_runner/build_runner.dart').
Try correcting the name to the name of an existing method, or defining a method named 'dryRun'.
    return _buildRunner.dryRun(
                        ^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:161:30: Error: Required named parameter 'linkingEnabled' must be provided.
    return _buildRunner.build(
                             ^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:563:9: Error: 'DryRunResult' isn't a type.
  final DryRunResult dryRunResult = await buildRunner.dryRun(
        ^^^^^^^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:754:37: Error: 'DryRunResult' isn't a type.
void ensureNativeAssetsBuildSucceed(DryRunResult result) {
                                    ^^^^^^^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/android/native_assets.dart:53:9: Error: 'DryRunResult' isn't a type.
  final DryRunResult dryRunResult = await buildRunner.dryRun(
        ^^^^^^^^^^^^
../../../fvm/versions/3.22.0/packages/flutter_tools/lib/src/isolated/native_assets/ios/native_assets.dart:51:9: Error: 'DryRunResult' isn't a type.
  final DryRunResult dryRunResult = await buildRunner.dryRun(
        ^^^^^^^^^^^^
➜  ios git:(adaptation_3.22.x) ✗ gem cleanup  
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin23/rbconfig.rb:21: warning: Insecure world writable dir /opt/homebrew/bin in PATH, mode 040777
Cleaning up installed gems...
Attempting to uninstall cocoapods-1.11.3
Unable to uninstall cocoapods-1.11.3:
        Gem::FilePermissionError: You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Attempting to uninstall xcodeproj-1.22.0
Unable to uninstall xcodeproj-1.22.0:
        Gem::FilePermissionError: You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Attempting to uninstall cocoapods-1.11.3
Unable to uninstall cocoapods-1.11.3:
        Gem::FilePermissionError: You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Attempting to uninstall xcodeproj-1.22.0
Unable to uninstall xcodeproj-1.22.0:
        Gem::FilePermissionError: You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Clean up complete

firebase相关配置如下:

firebase_crashlytics: ^4.0.4
firebase_analytics: ^11.2.1
firebase_core: ^3.3.0
firebase_messaging: ^15.0.4
firebase_auth: ^5.1.3
注意:对应iOS要求最低版本13.0,请修改iOS配置profile文件版本!!!

相关命令如下:

flutter相关包更新
flutter update-packages --force-upgrade
pod更新:
pod install --repo-update

关键命令:

gem清理一下:
gem cleanup

附上FVM的使用

结语:文章写得有点乱,将就一下,时间紧急,希望能帮到你!

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

明似水

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值