程序问答   发布时间:2022-06-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Flutter - TextFormField - 无法同时满足约束(NSAutoresizingMaskLayoutConstraint)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决Flutter - TextFormField - 无法同时满足约束(NSAutoresizingMaskLayoutConsTraint)?

开发过程中遇到Flutter - TextFormField - 无法同时满足约束(NSAutoresizingMaskLayoutConsTraint)的问题如何解决?下面主要结合日常开发的经验,给出你关于Flutter - TextFormField - 无法同时满足约束(NSAutoresizingMaskLayoutConsTraint)的解决方法建议,希望对你解决Flutter - TextFormField - 无法同时满足约束(NSAutoresizingMaskLayoutConsTraint)有所启发或帮助;

使用 Flutter ChAnnel stable,2.0.1,在 iPad 物理设备 iOS 14.4 上,每次我点击任何 TextFormFIEld 时都会收到以下控制台消息。

[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x281871540 h=--& v=--& _UIbuttonbarbutton:0x109a86990.height == 0   (activE)>","<NSLayoutConsTraint:0x28185d950 _UIUCBKBSELEctionBACkground:0x109b2ddf0.bottom == _UIbuttonbarbutton:0x109a86990.bottom - 6   (activE)>","<NSLayoutConsTraint:0x28185d770 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x109b2ddf0]   (active,names: '|':_UIbuttonbarbutton:0x109a86990 )>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x28185d950 _UIUCBKBSELEctionBACkground:0x109b2ddf0.bottom == _UIbuttonbarbutton:0x109a86990.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.
[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x281870e10 h=--& v=--& _UIbuttonbarbutton:0x11c9411b0.height == 0   (activE)>","<NSLayoutConsTraint:0x2818705f0 _UIUCBKBSELEctionBACkground:0x109c5a3b0.bottom == _UIbuttonbarbutton:0x11c9411b0.bottom - 6   (activE)>","<NSLayoutConsTraint:0x281871130 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x109c5a3b0]   (active,names: '|':_UIbuttonbarbutton:0x11c9411b0 )>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x2818705f0 _UIUCBKBSELEctionBACkground:0x109c5a3b0.bottom == _UIbuttonbarbutton:0x11c9411b0.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.
[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x281873ca0 h=--& v=--& _UIbuttonbarbutton:0x109ca0d90.height == 0   (activE)>","<NSLayoutConsTraint:0x281871040 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x109ca0f60]   (active,names: '|':_UIbuttonbarbutton:0x109ca0d90 )>","<NSLayoutConsTraint:0x2818714a0 _UIUCBKBSELEctionBACkground:0x109ca0f60.bottom == _UIbuttonbarbutton:0x109ca0d90.bottom - 6   (activE)>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x2818714a0 _UIUCBKBSELEctionBACkground:0x109ca0f60.bottom == _UIbuttonbarbutton:0x109ca0d90.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.
[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x2818702d0 h=--& v=--& _UIbuttonbarbutton:0x126929f40.height == 0   (activE)>","<NSLayoutConsTraint:0x28185f9d0 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x12692af20]   (active,names: '|':_UIbuttonbarbutton:0x126929f40 )>","<NSLayoutConsTraint:0x28185f700 _UIUCBKBSELEctionBACkground:0x12692af20.bottom == _UIbuttonbarbutton:0x126929f40.bottom - 6   (activE)>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x28185f700 _UIUCBKBSELEctionBACkground:0x12692af20.bottom == _UIbuttonbarbutton:0x126929f40.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.
[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x281851590 h=--& v=--& _UIbuttonbarbutton:0x109c45d70.height == 0   (activE)>","<NSLayoutConsTraint:0x281850c30 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x109c56fb0]   (active,names: '|':_UIbuttonbarbutton:0x109c45d70 )>","<NSLayoutConsTraint:0x281850cd0 _UIUCBKBSELEctionBACkground:0x109c56fb0.bottom == _UIbuttonbarbutton:0x109c45d70.bottom - 6   (activE)>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x281850cd0 _UIUCBKBSELEctionBACkground:0x109c56fb0.bottom == _UIbuttonbarbutton:0x109c45d70.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.
[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x281851a40 h=--& v=--& _UIbuttonbarbutton:0x109c8f2a0.height == 0   (activE)>","<NSLayoutConsTraint:0x281850f00 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x109c567b0]   (active,names: '|':_UIbuttonbarbutton:0x109c8f2a0 )>","<NSLayoutConsTraint:0x281850fa0 _UIUCBKBSELEctionBACkground:0x109c567b0.bottom == _UIbuttonbarbutton:0x109c8f2a0.bottom - 6   (activE)>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x281850fa0 _UIUCBKBSELEctionBACkground:0x109c567b0.bottom == _UIbuttonbarbutton:0x109c8f2a0.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.
[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x281852710 h=--& v=--& _UIbuttonbarbutton:0x109c3c760.height == 0   (activE)>","<NSLayoutConsTraint:0x281851e00 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x109c3cde0]   (active,names: '|':_UIbuttonbarbutton:0x109c3c760 )>","<NSLayoutConsTraint:0x281851ea0 _UIUCBKBSELEctionBACkground:0x109c3cde0.bottom == _UIbuttonbarbutton:0x109c3c760.bottom - 6   (activE)>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x281851ea0 _UIUCBKBSELEctionBACkground:0x109c3cde0.bottom == _UIbuttonbarbutton:0x109c3c760.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.
[LayoutConsTraints] 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. 
    (Note: If you're seeing NSautoresizingMaskLayoutConsTraints that you don't understand,refer to the documentation for the UIVIEw property translatesautoresizingMaskIntoConsTraints) 
(
    "<NSautoresizingMaskLayoutConsTraint:0x28185c1e0 h=--& v=--& _UIbuttonbarbutton:0x109c3cf60.height == 0   (activE)>","<NSLayoutConsTraint:0x2818520d0 V:|-(6)-[_UIUCBKBSELEctionBACkground:0x109ca5eb0]   (active,names: '|':_UIbuttonbarbutton:0x109c3cf60 )>","<NSLayoutConsTraint:0x281852170 _UIUCBKBSELEctionBACkground:0x109ca5eb0.bottom == _UIbuttonbarbutton:0x109c3cf60.bottom - 6   (activE)>"
)


Will attempt to recover by breaking consTraint 
<NSLayoutConsTraint:0x281852170 _UIUCBKBSELEctionBACkground:0x109ca5eb0.bottom == _UIbuttonbarbutton:0x109c3cf60.bottom - 6   (activE)>


Make a symbolic breakpoint at UIVIEwAlertForUnsatisfiableConsTraints to catch this in the deBUGger.
The methods in the UIConsTraintBasedLayoutDeBUGging category on UIVIEw Listed in <UIKitCore/UIVIEw.h> may also be Helpful.

文本字段上的 onTap 只是将焦点放在该字段上 - 键盘出现 - 但不会更改视图上的任何内容。

我了解到,对于某些人来说,此消息可以被忽略,但对于某些人来说,Apple 已拒绝更新应用程序。

我们如何解决这个约束问题?

解决方法

在 Form() 小部件中使用 key 属性时似乎是一个错误。 GlobalKey<FormState>()

也可能是您的容器/小部件与键盘发生冲突。如果导致不稳定的行为,IOS 会打破屏幕对象的约束。

尝试移除您的容器(高度和宽度)限制。这对我有用。

大佬总结

以上是大佬教程为你收集整理的Flutter - TextFormField - 无法同时满足约束(NSAutoresizingMaskLayoutConstraint)全部内容,希望文章能够帮你解决Flutter - TextFormField - 无法同时满足约束(NSAutoresizingMaskLayoutConstraint)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:-Flutter