MACOSX_DEPLOYMENT_TARGET问题(目标版本错误)

问题描述 投票:0回答:1

当我尝试编译我的 flutter 程序时,我得到了这个:

/* com.apple.ibtool.errors */
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Runner/Base.lproj/MainMenu.xib: error: Compilation failed. Unable to write to path: /Users/maxime/avekia/flutter_ssi_app/avekia/build/macos/Build/Products/Debug/AvekIA.app/Contents/Resources/Base.lproj/MainMenu.nib
    Underlying Errors:
        Description: The file “MainMenu.nib” couldn’t be saved in the folder “Base.lproj”.
        Underlying Errors:
            Description: The operation couldn’t be completed. Is a directory
            Failure Reason: Is a directory
        Description: “MainMenu.nib” couldn’t be removed because you don’t have permission to access it.
        Failure Reason: You don’t have permission.
        Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info.
        Underlying Errors:
            Description: The operation couldn’t be completed. Permission denied
            Failure Reason: Permission denied
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'url_launcher_macos' from project 'Pods')
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'catcher' from project 'Pods')
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'package_info_plus_macos' from project 'Pods')
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'path_provider_macos' from project 'Pods')
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'device_info_plus_macos' from project 'Pods')
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'Pods-Runner' from project 'Pods')
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Runner.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'Flutter Assemble' from project 'Runner')
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
/Users/maxime/avekia/flutter_ssi_app/avekia/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 13.0.99. (in target 'FlutterMacOS' from project 'Pods')
** BUILD FAILED **

Exception: Build process failed

我尝试过改变

platform :osx, '10.11'

到 macos/podfile 内的 10.13 但没有帮助。 我也尝试过改变

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_macos_build_settings(target)
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_macos_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.13'
    end
  end
end

这样,一些错误消失了(“在项目‘Pods’的目标‘path_provider_macos’中”),但我保留了其他错误。

感谢您的帮助

xcode flutter macos
1个回答
0
投票

清除此错误的步骤

  1. 颤抖干净
  2. 删除构建文件夹
  3. Flutter 酒吧获取

再次运行,就可以了 对我有用

© www.soinside.com 2019 - 2024. All rights reserved.