繁体   English   中英

Flutter 不会编译我的应用程序的发布版本?

[英]Flutter won't compile a release build of my app?

在使用这个应用程序之后,我尝试使用flutter run --release命令将我的应用程序构建到 iOS。 但每当我这样做时,我都会收到此错误*Could not build the precompiled application for the device.*

我试过flutter clean然后flutter upgrade 我已经切换了 flutter 分支机构。 我对这个很迷茫!

这是终端 output:

Building com.example.projectqr for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: HRCH36A6AR
Running pod install...                                             872ms
Running Xcode build...
Xcode build done.                                            3.7s
Failed to build iOS app
Error output from Xcode build:
↳
    objc[9606]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f84f8).
    One of the two will be used. Which one is undefined.
    objc[9606]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    (0x1085f8548). One of the two will be used. Which one is undefined.
    objc[9606]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    (0x1085f8598). One of the two will be used. Which one is undefined.
    objc[9606]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f85e8). One of
    the two will be used. Which one is undefined.
    objc[9606]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f8638).
    One of the two will be used. Which one is undefined.
    objc[9606]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1fde66040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f8688). One of
    the two will be used. Which one is undefined.
    2022-04-26 18:57:12.964 xcodebuild[9606:80050] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in
    com.apple.dt.IDEWatchSupportCore
    2022-04-26 18:57:12.964 xcodebuild[9606:80050] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension
    Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/4v/gxt19vmx267662mjsmfhf8mc0000gn/T/flutter_tools.WkwIsq/flutter_ios_build_temp_dirgZNqVy/temporary_xcresult_bundle


    Failed to package /Users/adamjackson/Documents/Github/projectQR/Flutter.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/4v/gxt19vmx267662mjsmfhf8mc0000gn/T/flutter_tools.WkwIsq/flutter_ios_build_temp_dirgZNqVy/temporary_xcresult_bundle


Encountered error while building for device.

谢谢参观!

1.执行

Flutter Clean

然后

  1. 从Xcode中移除模拟器,重新添加一个新的模拟器

然后

  1. 在 flutter 中重新运行您的应用程序,它将是

进一步的解决方案:

  • 在Xcode中打开iOS模块。

我终于找到了解决办法!

问题最终是 CocoaPod 没有正确安装。

在挖掘了一生的感觉之后,我再次安装了 HomeBrew,然后使用brew install cocoapods命令重新安装了 cocoapod。 之后我运行flutter clean然后flutter run并且它签署了应用程序并在我的 iPhone 上启动它!

感谢您的想法并帮助我解决这个问题!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM