Flutter показывает старые ошибкиAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Flutter показывает старые ошибки

Сообщение Anonymous »

Я писал флаттер-приложение, но когда я хочу протестировать его на эмуляторе Android (Ctrl+F5), я получаю неисправимую ошибку. Это часть этого:

Код: Выделить всё

I/flutter (13782): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (13782): The following assertion was thrown during performResize():
I/flutter (13782): Vertical viewport was given unbounded height.
I/flutter (13782): Viewports expand in the scrolling direction to fill their container. In this case, a vertical
I/flutter (13782): viewport was given an unlimited amount of vertical space in which to expand. This situation
I/flutter (13782): typically happens when a scrollable widget is nested inside another scrollable widget.
I/flutter (13782): If this widget is always nested in a scrollable widget there is no need to use a viewport because
I/flutter (13782): there will always be enough vertical space for the children. In this case, consider using a Column
I/flutter (13782): instead. Otherwise, consider using the "shrinkWrap" property (or a ShrinkWrappingViewport) to size
I/flutter (13782): the height of the viewport to the sum of the heights of its children.
I/flutter (13782):
I/flutter (13782): The relevant error-causing widget was:
I/flutter (13782):   ListView  (file:///D:/flutterProjects/test_project/test_project/lib/screens/all_obj_screen.dart:19:18)
Как вы можете видеть, в последней строке говорится, что причиной ошибки является ListView в D:/flutterProjects/test_project/test_project/lib/screens /all_obj_screen.dart. Проблема в том, что у меня в этом файле нет ListView (на данный момент, но он у меня был раньше), и этого пути больше не существует!

Если это может помочь, это файл all_obj_screen.dart:

Код: Выделить всё

class AllObjScreen extends StatefulWidget {
@override
_AllObjScreenState createState() => _AllObjScreenState();
}

class _AllObjScreenState extends State {
@override
Widget build(BuildContext context) {
final objects = Provider.of(context);

return Center(
child: Text(
'${objects.items.length}',
style: TextStyle(
color: Colors.white,
fontSize: 25,
),
),
);
}
}
Итак, я думаю, что проблема не в моем коде, а в коде Visual Studio. Как решить эту проблему?

РЕДАКТИРОВАТЬ:
Я пытался запустить приложение как в Visual Studio Code, так и в Android Studio, но проблема та же.
Я также пытался переустановить IDE и флаттер, но безуспешно.

Подробнее здесь: https://stackoverflow.com/questions/593 ... old-errors
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»