【iOS】【Flutter】【Mark】Library not loaded: @rpath/libavcodec.framework/libavcodec

罗学真
2023-12-01

简述

我在M1的MacBook Pro上写的flutter项目,在Intel的MacBook Pro上打开,结果报错,报错内容如下:

(lldb) dyld[27861]: Library not loaded: @rpath/libavcodec.framework/libavcodec
  Referenced from: /private/var/containers/Bundle/Application/DC76367F-1E7E-42AC-8AAA-1C705BE02EEB/Runner.app/Runner
  Reason: tried: '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), '/usr/lib/swift/libavcodec.framework/libavcodec' (no such file), 
 ......
* thread #1, stop reason = signal SIGABRT
    frame #0: 0x0000000102b007a0 dyld`__abort_with_payload + 8
dyld`__abort_with_payload:
->  0x102b007a0 <+8>:  b.lo   0x102b007c0               ; <+40>
    0x102b007a4 <+12>: pacibsp 
    0x102b007a8 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x102b007ac <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Error launching application on iPhone.

解决办法

flutter 项目下面的build删除即可

 类似资料: