• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - 在 xCode 6.4 中成功构建后,在 xCode 7 Beta 6 中构建项目时出错

[复制链接]
菜鸟教程小白 发表于 2022-12-13 10:42:07 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

在我升级我的 IDE 后,尽管没有更改任何其他内容,但仍输出以下错误:

CompileAssetCatalog      /Users/suy/Library/Developer/Xcode/DerivedData/MyADT-enhkcdzrxjsfitcgsibsehlazpgg/Build/Products/Release-iphonesimulator/MyADT.app MyADT/Images.xcassets
cd /Users/suy/Desktop/self-service-mobile-ios
export   PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator. platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/suy/Library/Developer/Xcode/DerivedData/MyADT-enhkcdzrxjsfitcgsibsehlazpgg/Build/Intermediates/MyADT.build/Release-iphonesimulator/MyADT.build/assetcatalog_dependencies.txt --output-partial-info-plist /Users/suy/Library/Developer/Xcode/DerivedData/MyADT-enhkcdzrxjsfitcgsibsehlazpgg/Build/Intermediates/MyADT.build/Release-iphonesimulator/MyADT.build/assetcatalog_generated_info.plist --app-icon AppIcon --launch-image LaunchImage --platform iphonesimulator --minimum-deployment-target 7.1 --target-device iphone --target-device ipad --compress-pngs --compile /Users/suy/Library/Developer/Xcode/DerivedData/MyADT-enhkcdzrxjsfitcgsibsehlazpgg/Build/Products/Release-iphonesimulator/MyADT.app /Users/suy/Desktop/self-service-mobile-ios/MyADT/Images.xcassets

2015-09-09 11:28:44.991 IBCocoaTouchImageCatalogTool[25293:921614] *** Terminating app due to uncaught exception 'IBAssertionFailure', reason: 'ASSERTION FAILURE:
Reason:     code which should be unreachable has been reached
File:       /SourceCache/IBAutolayoutFoundationIOS/IDEInterfaceBuilder-7706/Foundation/ImageCatalog/Compiler/IBICCoreThemeDocument.m:349 
Method:     -[IBICCoreThemeDocument coreUIResizingModeForResizingBehavior:]'
...
...
libc++abi.dylib: terminating with uncaught exception of type NSException
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/actool failed with exit code 255



Best Answer-推荐答案


您的问题确实是由于 xcode 7 中更改了 xcassets 的格式。但是,通过删除 block ,您将丢失图像拉伸(stretch)行为设置。

相反,您可以通过将 "cap-insets" 更改为 "capInsets" 并将 "mode": "tile" 更改为 “模式”:“填充”

这是您案例的结果字符串:

{
  "images": [
    {
      "idiom": "universal",
      "filename": "login_show_button.png",
      "scale": "1x"
    },
    {
      "resizing": {
        "mode": "9-part",
        "center": {
          "mode": "tile",
          "width": 4,
          "height": 3
        },
        "cap-insets": {
          "bottom": 5,
          "top": 6,
          "right": 7,
          "left": 9
        }
      },
      "idiom": "universal",
      "filename": "login_show_button@2x.png",
      "scale": "2x"
    },
    {
      "idiom": "universal",
      "scale": "3x"
    }
  ],
  "info": {
    "version": 1,
    "author": "xcode"
  }
}

关于ios - 在 xCode 6.4 中成功构建后,在 xCode 7 Beta 6 中构建项目时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32486540/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap