cordova for ios: Unable to simultaneously satisfy constraints.

Posted 谈晓鸣

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cordova for ios: Unable to simultaneously satisfy constraints.相关的知识,希望对你有一定的参考价值。

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

html页面代码:

<html><head></head>
<body>
        <input type="file" />
    </body>
</html>

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

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

以上是关于cordova for ios: Unable to simultaneously satisfy constraints.的主要内容,如果未能解决你的问题,请参考以下文章

Process refuced to die after 10 seconds,and couldn't taskkill it:Unable to find executable for:t

Unable to download data from http://ruby.taobao.org/ & don't have write permissions for th

位置栏未出现在 InAppBrowser for iOS、Cordova 中

CanvasCamera for iOS PhoneGap / Cordova

在 iOS 中使用 PushPlugin for Cordova 清除单个通知

Cordova for IOS 中动量滚动期间的滚动事件