为了账号安全,请及时绑定邮箱和手机立即绑定

A GlobalKey was used multiple times inside one widget's child list.

出师未捷身先死:

Installing ../../flutter/myapp/build/app/outputs/apk/app.apk...

E/flutter ( 3378): [ERROR:flutter/shell/common/shell.cc(178)] Dart Error: Unhandled exception:

E/flutter ( 3378): 'dart:ui/window.dart': Failed assertion: line 306: '<optimized out>': is not true.

E/flutter ( 3378): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:40:39)

E/flutter ( 3378): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)

E/flutter ( 3378): #2      new Locale.fromSubtags (dart:ui/window.dart:306:15)

E/flutter ( 3378): #3      _updateLocales (dart:ui/hooks.dart:89:43)

Syncing files to device Android SDK built for x86...

I/flutter ( 3378): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════

I/flutter ( 3378): The following NoSuchMethodError was thrown building ScrollConfiguration(behavior:

I/flutter ( 3378): _MaterialScrollBehavior):

I/flutter ( 3378): The getter 'languageCode' was called on null.

I/flutter ( 3378): Receiver: null

I/flutter ( 3378): Tried calling: languageCode

初始化项目,启动时报这个错误,不知道有没有遇到的,如何解决?

正在回答

1 回答

问题解决了!可能原因是虚拟设备为设置语言环境,默认und语言,无法识别语言环境报的错误。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
【Flutter入门】3小时完成微信读书发现界面
  • 参与学习       4346    人
  • 解答问题       32    个

零基础快速上手Flutter,还原真实大厂案例,增强移动端面试竞争力。

进入课程

A GlobalKey was used multiple times inside one widget's child list.

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信