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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章