前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >cordova for ios: Unable to simultaneously satisfy constraints.

cordova for ios: Unable to simultaneously satisfy constraints.

作者头像
tandaxia
发布2018-09-27 15:34:18
7870
发布2018-09-27 15:34:18
举报
文章被收录于专栏:谈补锅

  使用cordova开发ios项目的时候,在上传图片碰到一个问题。使用html的<input type="file"/>标签来选择照片或者拍照片,引起了布局报错,然后图片上传过程中很容易崩溃闪退。

html页面代码:

代码语言:javascript
复制
<html><head></head>
<body>
        <input type="file" />
    </body>
</html>

然后在真机测试,点击选择文件,控制台出现布局报错日志:

代码语言:javascript
复制
Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x156734e0 UILabel:0x1568b9f0.width == UIView:0x155d9110.width - 32>",
    "<NSLayoutConstraint:0x1568db80 UIView:0x155d9110.width == UIView:0x155d8fc0.width>",
    "<NSLayoutConstraint:0x156913b0 H:[UIView:0x155d8fc0(30)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x156734e0 UILabel:0x1568b9f0.width == UIView:0x155d9110.width - 32>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

然后上传图片或者视频的时候,常会出现崩溃闪退现象。在cordova和phonegap搜了下,没搜到解决的办法,不知道哪位兄台又碰到这个问题么,指点我一下!

完整cordova for ios demo下载:http://download.csdn.net/detail/tandaxia/9455872

原文链接:http://www.cnblogs.com/tandaxia/p/5255394.html

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2016-03-08 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档