Flutter-upgrade сломал мое приложение

Jacob Soffer спросил: 13 июня 2018 в 12:05 в: android

Я создаю приложение, используя флаттер, и он работал нормально, пока я не выбрал команду flutter-upgrade для обновления моей установки. Теперь часть приложения, в котором я использую ListView, полностью сломана, и после попытки получить доступ к той части приложения, где используется ListView, остальная часть приложений разбивается, а виджеты прекращают рендеринг должным образом.

Все отлично работало, прежде чем я обновил свою установку флаттера, и мне нужно, чтобы приложение было завершено к следующей неделе.

Вот журнал:

I/flutter ( 4850): Another exception was thrown: not implemented
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: _RenderListTile#d393e relayoutBoundary=up13 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPadding#91fed relayoutBoundary=up12 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#f8b9f relayoutBoundary=up11 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPointerListener#907c6 relayoutBoundary=up10 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsGestureHandler#82c34 relayoutBoundary=up9 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#c0929 relayoutBoundary=up8 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#cb75f relayoutBoundary=up7 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#f4dd1 relayoutBoundary=up6 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPadding#21ed2 relayoutBoundary=up5 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#bfca1 relayoutBoundary=up4 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 441 pos 12: 'child.hasSize': is not true.
I/flutter ( 4850): Another exception was thrown: NoSuchMethodError: The getter 'scrollOffsetCorrection' was called on null.
I/flutter ( 4850): Another exception was thrown: NoSuchMethodError: The method 'debugAssertIsValid' was called on null.
I/flutter ( 4850): Another exception was thrown: NoSuchMethodError: The getter 'visible' was called on null.
I/flutter ( 4850): Another exception was thrown: Please see the documentation for computeDistanceToActualBaseline for the required calling conventions of this method.
I/flutter ( 4850): Another exception was thrown: Please see the documentation for computeDistanceToActualBaseline for the required calling conventions of this method.
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: _RenderListTile#287cb relayoutBoundary=up24 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPadding#c0494 relayoutBoundary=up23 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#aeb03 relayoutBoundary=up22 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPointerListener#e84fd relayoutBoundary=up21 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsGestureHandler#9eefe relayoutBoundary=up20 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderFlex#21c05 relayoutBoundary=up19 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#206e4 relayoutBoundary=up18 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#97115 relayoutBoundary=up17 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#a3dfd relayoutBoundary=up16 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPadding#b037b relayoutBoundary=up15 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#73cda relayoutBoundary=up14 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 441 pos 12: 'child.hasSize': is not true.
I/flutter ( 4850): Another exception was thrown: NoSuchMethodError: The getter 'scrollOffsetCorrection' was called on null.
I/flutter ( 4850): Another exception was thrown: NoSuchMethodError: The method 'debugAssertIsValid' was called on null.
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderShrinkWrappingViewport#3820e relayoutBoundary=up10 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderIgnorePointer#24f8f relayoutBoundary=up9 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#2dc3c relayoutBoundary=up8 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPointerListener#3a18a relayoutBoundary=up7 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsGestureHandler#32415 relayoutBoundary=up6 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: _RenderExcludableScrollSemantics#4231f relayoutBoundary=up5 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#25954 relayoutBoundary=up4 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#f9945 relayoutBoundary=up3 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#d55b6 relayoutBoundary=up2 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: Please see the documentation for computeDistanceToActualBaseline for the required calling conventions of this method.
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: _RenderListTile#55872 relayoutBoundary=up9 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPadding#14d29 relayoutBoundary=up8 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#da286 relayoutBoundary=up7 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderPointerListener#ac1fb relayoutBoundary=up6 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderSemanticsGestureHandler#daa7e relayoutBoundary=up5 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: RenderBox was not laid out: RenderFlex#4e74a relayoutBoundary=up4 NEEDS-PAINT
I/flutter ( 4850): Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 441 pos 12: 'child.hasSize': is not true.
I/flutter ( 4850): Another exception was thrown: NoSuchMethodError: The getter 'scrollOffsetCorrection' was called on null.
I/flutter ( 4850): Another exception was thrown: NoSuchMethodError: The method 'debugAssertIsValid' was called on null.

Любая помощь вы можете предоставить высоко ценится. Спасибо заранее.

PS: На всякий случай, код, в котором реализован ListView, можно найти здесь.

Моя версия Flutter: Flutter 0.5. 7-pre.62 • мастер канала • https://github.com/flutter/flutter.gitFramework • revision 7ac183794b (27 часов назад) • 2018-07-06 15:21:29 -0700Engine • revision 6fe748490dTools • Dart 2.0. 0-dev.63.0.flutter-4c9689c1d2

Я сейчас на главном канале, но приложение все еще ломается с последней строкой из бета-канала.

2 ответа

Есть решение
Rémi Rousselet ответил: 14 июня 2018 в 06:13

Вы можете в любой момент понизить флаттер, клонируя репозиторий Flutter в желаемой версии. Затем выполните flutter doctor.

Bostrot ответил: 14 июня 2018 в 02:17
Добавляя к этому ответу: вы также можете выбрать собственный канал с помощью flutter channel beta. Я знаю, что бета-канал в настоящее время на 0.5.1
Nash ответил: 15 июня 2018 в 10:36

Добавляя к предыдущему ответу, вы можете использовать ветвь dev вместо master. Поскольку все больше и больше людей вносят вклад в Flutter, master может стать неустойчивым. dev обычно находится за неделю позади мастера и намного более стабилен для разработки.

Дополнительное видео по вопросу: Flutter-upgrade сломал мое приложение

Flutter & Dart for the Native, Cross Platform Mobile App Development

Мобильный фреймворк Flutter от Google — взгляд Android разработчика [GeekBrains]

Flutter или как сделать в андроид студии. Одно приложение под iOS и Android