Swift编程

错误解决:dyld: Library not loaded: @

2016-05-31  本文已影响2966人  JackMayx

用纯Swift程序真机调试,出现以下异常,在模拟器可以跑,用OC写的也可以跑,为什么
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/Bundle/Application/930B04BF-8608-4075-A3B9-7FE2669F02BC/myTry.app/myTry Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/930B04BF-8608-4075-A3B9-7FE2669F02BC/myTry.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x1000F4000, size=0x0018C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/930B04BF-8608-4075-A3B9-7FE2669F02BC/myTry.app/Frameworks/libswiftCore.dylib

解决方法:

  1. 退出 Xcode
  2. 重启电脑
  3. 找到 这个 DerivedData 文件夹 删除 (路径: ~/Library/Developer/Xcode/DerivedData)
  4. 删除这个 com.apple.dt.Xcode 文件 (路径: ~/Library/Caches/com.apple.dt.Xcode)

然后 在运行 Xcode 就好了~~

上一篇下一篇

猜你喜欢

热点阅读