text:
Positioned cause "Another exception was thrown: RenderBox was not laid out."

class ListItem extends StatelessWidget {

  ShapeBorder _shape;
  Widget _imageWidget;
  Widget _descWidget;

  static const double height = 366.0;
  ListItemData _listItemData;
  ListItem(this._listItemData);

  void init(BuildContext context){
    _shape = const RoundedRectangleBorder(
        borderRadius: BorderRadius.only(
        topLeft: Radius.circular(16.0),
        topRight: Radius.circular(16.0),
        bottomLeft: Radius.circular(2.0),
        bottomRight: Radius.circular(2.0),
      ),
    );

    _imageWidget = SizedBox(
            height: 184.0,
            child: Stack(
              children: <Widget>[
                // image
                Positioned.fill(child: Image.asset(_listItemData.imgPath, fit: BoxFit.cover,),),
                // image text
                Positioned(        // Here !!!!
                  bottom: 16.0,
                  left: 16.0,
                  right: 16.0,
                  child: FittedBox(fit: BoxFit.scaleDown, alignment: Alignment.bottomLeft, child: Text(_listItemData.imgDesc, style: TextStyle(color: Colors.white),)),
                ),
              ],
            ),
          );

    _descWidget = Expanded(
        child: Padding(
        padding: EdgeInsets.all(16.0),
        child: new Text(
          _listItemData.desc,
          softWrap: true,),
      )
    );
  }

  @override
  Widget build(BuildContext context) {
    init(context);
    return GestureDetector(
        child: Card(
          shape: _shape,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              _imageWidget,
              _descWidget,
            ],
          ),
        ),
      );
  }
}

Throw error:
I/flutter ( 4451): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 4451): The following assertion was thrown during performLayout():
I/flutter ( 4451): 'package:flutter/src/rendering/box.dart': Failed assertion: line 307 pos 12: 'width > 0.0': is not
I/flutter ( 4451): true.
I/flutter ( 4451):
I/flutter ( 4451): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter ( 4451): more information in this error message to help you determine and fix the underlying cause.
I/flutter ( 4451): In either case, please report this assertion by filing a bug on GitHub:
I/flutter ( 4451):   https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter ( 4451):
I/flutter ( 4451): When the exception was thrown, this was the stack:
I/flutter ( 4451): #2      BoxConstraints.constrainSizeAndAttemptToPreserveAspectRatio (package:flutter/src/rendering/box.dart:307:12)
I/flutter ( 4451): #3      RenderFittedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:2256:26)
I/flutter ( 4451): #4      RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #5      RenderStack.performLayout (package:flutter/src/rendering/stack.dart:549:15)
I/flutter ( 4451): #6      RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #7      RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:258:13)
I/flutter ( 4451): #8      RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #9      RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15)
I/flutter ( 4451): #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #11     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #12     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #13     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #14     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #15     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #16     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1188:11)
I/flutter ( 4451): #17     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #18     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11)
I/flutter ( 4451): #19     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #20     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #21     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #22     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #23     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #24     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #25     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #26     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #27     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #28     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #29     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #30     RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:214:15)
I/flutter ( 4451): #31     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #32     RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:182:11)
I/flutter ( 4451): #33     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #34     RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:405:13)
I/flutter ( 4451): #35     RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1316:12)
I/flutter ( 4451): #36     RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1234:20)
I/flutter ( 4451): #37     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #38     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #39     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #40     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #41     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #42     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #43     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #44     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #45     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #46     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #47     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #48     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #49     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #50     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #51     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #52     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #53     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #54     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:142:11)
I/flutter ( 4451): #55     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:339:7)
I/flutter ( 4451): #56     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:212:7)
I/flutter ( 4451): #57     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:356:14)
I/flutter ( 4451): #58     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #59     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #60     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #61     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #62     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1188:11)
I/flutter ( 4451): #63     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #64     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #65     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #66     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #67     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #68     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #69     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #70     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #71     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #72     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #73     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #74     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #75     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #76     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #77     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #78     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #79     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2881:13)
I/flutter ( 4451): #80     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #81     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15)
I/flutter ( 4451): #82     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #83     __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #84     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #85     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #86     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #87     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #88     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #89     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #90     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #91     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #92     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #93     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
I/flutter ( 4451): #94     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
I/flutter ( 4451): #95     RenderView.performLayout (package:flutter/src/rendering/view.dart:147:13)
I/flutter ( 4451): #96     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1509:7)
I/flutter ( 4451): #97     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:768:18)
I/flutter ( 4451): #98     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:281:19)
I/flutter ( 4451): #99     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:677:13)
I/flutter ( 4451): #100    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
I/flutter ( 4451): #101    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 4451): #102    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 4451): #103    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)
I/flutter ( 4451): #105    _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
I/flutter ( 4451): #106    _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
I/flutter ( 4451): #107    _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
I/flutter ( 4451): (elided 3 frames from class _AssertionError and package dart:async)
I/flutter ( 4451):
I/flutter ( 4451): The following RenderObject was being processed when the exception was fired:
I/flutter ( 4451):   RenderFittedBox#1e70a relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT
Reloaded 3 of 422 libraries in 609ms.
I/flutter ( 4451):   creator: FittedBox ← Positioned ← Stack ← SizedBox ← Column ← DefaultTextStyle ←
I/flutter ( 4451):   AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#1f02d ink renderer] ←
I/flutter ( 4451):   NotificationListener<LayoutChangedNotification> ← CustomPaint ← _ShapeBorderPaint ← PhysicalShape
I/flutter ( 4451):   ← ⋯
I/flutter ( 4451):   parentData: right=16.0; bottom=16.0; left=16.0; offset=Offset(0.0, 0.0) (can use size)
I/flutter ( 4451):   constraints: BoxConstraints(w=347.4, 0.0<=h<=Infinity)
I/flutter ( 4451):   size: MISSING
I/flutter ( 4451):   fit: scaleDown
I/flutter ( 4451):   alignment: bottomLeft
I/flutter ( 4451):   textDirection: ltr
I/flutter ( 4451): This RenderObject had the following child:
I/flutter ( 4451):   RenderParagraph#4803c relayoutBoundary=up4 NEEDS-PAINT
I/flutter ( 4451): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 4451): Another exception was thrown: RenderBox was not laid out: RenderFittedBox#1e70a relayoutBoundary=up3 NEEDS-PAINT
I/flutter ( 4451): Another exception was thrown: RenderBox was not laid out: RenderFittedBox#1e70a relayoutBoundary=up3

The error disappeared when I set that
    _imageWidget = SizedBox(
            height: 184.0,
            child: Stack(
              children: <Widget>[
                // image
                Positioned.fill(child: Image.asset(_listItemData.imgPath, fit: BoxFit.cover,),),
                // image text
//                Positioned(
//                  bottom: 16.0,
//                  left: 16.0,
//                  right: 16.0,
//                  child: FittedBox(fit: BoxFit.scaleDown, alignment: Alignment.bottomLeft, child: Text(_listItemData.imgDesc, style: TextStyle(color: Colors.white),)),
//                ),
              ],
            ),
          );

Self-contained compilation-error-free reproduction
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'text',
            ),
            ListItem(),
          ],
        ),
      ),
    );
  }
}

class ListItem extends StatelessWidget {
  final ShapeBorder _shape = const RoundedRectangleBorder(
    borderRadius: BorderRadius.only(
      topLeft: Radius.circular(16.0),
      topRight: Radius.circular(16.0),
      bottomLeft: Radius.circular(2.0),
      bottomRight: Radius.circular(2.0),
    ),
  );
  final Widget _imageWidget = SizedBox(
    height: 184.0,
    child: Stack(
      children: <Widget>[
        // image
        Positioned.fill(
          child: Image.network(
            'https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Example.svg/1024px-Example.svg.png',
            fit: BoxFit.cover,
          ),
        ),
        // image text
        Positioned(
          // Here !!!!
          bottom: 16.0,
          left: 16.0,
          right: 16.0,
          child: FittedBox(
              fit: BoxFit.scaleDown,
              alignment: Alignment.bottomLeft,
              child: Text(
                'image description',
                style: TextStyle(color: Colors.white),
              )),
        ),
      ],
    ),
  );
  final Widget _descWidget = Expanded(
      child: Padding(
    padding: EdgeInsets.all(16.0),
    child: new Text(
      'description',
      softWrap: true,
    ),
  ));

  static const double height = 366.0;

  @override
  Widget build(BuildContext context) => GestureDetector(
        child: Card(
          shape: _shape,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              _imageWidget,
              _descWidget,
            ],
          ),
        ),
      );
}

Error log output https://gist.github.com/zoechi/92bc66f36ddf0a223a449a98bd8836d5
[✓] Flutter (Channel beta, v0.11.9, on Mac OS X 10.14.1 18B75, locale en-AT)
    • Flutter version 0.11.9 at /Users/zoechi/flutter/flutter
    • Framework revision d48e6e433c (5 days ago), 2018-11-20 22:05:23 -0500
    • Engine revision 5c8147450d
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /usr/local/opt/android-sdk
    • Android NDK at /usr/local/opt/android-sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /usr/local/opt/android-sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ Verify that all connected devices have been paired with this computer in Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 23.1.2
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 30.0.2
    • Dart plugin version 182.5124

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

! Doctor found issues in 1 category.

@zoechi The problem in your example can be resolved in two ways depending on what effect you're going for:

Remove the Expanded around Text('description'). If you do that the Card widget is tightly wrapping around the image and the description text
Add an Expanded around ListItem(). That way the Card widget fills the full screen.

What's the problem here? The Column widget tells each child that they can be as tall as they like (they are given a hight constraint of infinity). So the first Column widget in _MyHomePageState.build tells its children (the Column widget in ListItem.build) that it can be infinitely tall. The second column widget tells the same thing to its children, but one of the children is wrapped in an Expanded, which means it wants to use up all remaining space in the second Column. However, the second Column had been told that it may have a hight of infinity. The remaining space of an infinitely tall column is still infinity and we can't properly layout that. You see the exception you posted telling you exactly that. Now you can either remove the Expanded around the child in the second column and it will no longer try to use up the infinitely large remaining space. Or you can wrap the second column itself in an Expanded widget. That way the first column will not get a hight constraint of infinity from the first column, but instead is told to only use up the remaining space in the first column (which is an exact pixel amount). The Expanded child of the second column is now no longer told to use up the remaining space of infinity and everything works out.
Having said all this, that doesn't seem to be the problem that @blackredscarf was having. There's no nested column in that example code (at least in the part that was posted) and the exception also looks different. Having said that, I am unable to re-produce your problem, @blackredscarf, using the following slightly modified code:
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: ListItem(),
    );
  }
}

class ListItem extends StatelessWidget {

  ShapeBorder _shape;
  Widget _imageWidget;
  Widget _descWidget;

  static const double height = 366.0;
  ListItem();

  void init(BuildContext context){
    _shape = const RoundedRectangleBorder(
      borderRadius: BorderRadius.only(
        topLeft: Radius.circular(16.0),
        topRight: Radius.circular(16.0),
        bottomLeft: Radius.circular(2.0),
        bottomRight: Radius.circular(2.0),
      ),
    );

    _imageWidget = SizedBox(
      height: 184.0,
      child: Stack(
        children: <Widget>[
          // image
          Positioned.fill(child: Image.network('https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Example.svg/1024px-Example.svg.png', fit: BoxFit.cover,),),
          // image text
          Positioned(        // Here !!!!
            bottom: 16.0,
            left: 16.0,
            right: 16.0,
            child: FittedBox(fit: BoxFit.scaleDown, alignment: Alignment.bottomLeft, child: Text('Long Text', style: TextStyle(color: Colors.white),)),
          ),
        ],
      ),
    );

    _descWidget = Expanded(
        child: Padding(
          padding: EdgeInsets.all(16.0),
          child: new Text(
            'Long Text',
            softWrap: true,),
        )
    );
  }

  @override
  Widget build(BuildContext context) {
    init(context);
    return GestureDetector(
      child: Card(
        shape: _shape,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            _imageWidget,
            _descWidget,
          ],
        ),
      ),
    );
  }
}

@blackredscarf If you're still experiencing this issue can you provide more context, e.g. a code example that shows how you're using the ListItem? Ideally, I should be able to directly run the code example without modifications to reproduce your issue.

@goderbauer @zoechi
I find the wrong caused by zero-length string. Becase there is a _listItemData.imgDesc is "".
Complete Example:

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class ListItemData {
  int id;
  String imgPath;
  String imgDesc;
  String title;
  String desc;
}

class ListItem extends StatelessWidget {

  ShapeBorder _shape;
  Widget _imageWidget;
  Widget _descWidget;

  static const double height = 366.0;
  ListItemData _listItemData;
  ListItem(this._listItemData);

  void init(BuildContext context){
    _shape = const RoundedRectangleBorder(
      borderRadius: BorderRadius.only(
        topLeft: Radius.circular(16.0),
        topRight: Radius.circular(16.0),
        bottomLeft: Radius.circular(2.0),
        bottomRight: Radius.circular(2.0),
      ),
    );

    _imageWidget = SizedBox(
      height: 184.0,
      child: Stack(
        children: <Widget>[
          // image
          Positioned.fill(child: Image.asset(_listItemData.imgPath, fit: BoxFit.cover,),),
          // image text
          Positioned(        // Here !!!!
            bottom: 16.0,
            left: 16.0,
            right: 16.0,
            child: FittedBox(fit: BoxFit.scaleDown, alignment: Alignment.bottomLeft, child: Text(_listItemData.imgDesc, style: TextStyle(color: Colors.white),)),
          ),
        ],
      ),
    );

    _descWidget = Expanded(
        child: Padding(
          padding: EdgeInsets.all(16.0),
          child: new Text(
            _listItemData.desc,
            softWrap: true,),
        )
    );
  }

  @override
  Widget build(BuildContext context) {
    init(context);
    return GestureDetector(
      child: Card(
        shape: _shape,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            _imageWidget,
            _descWidget,
          ],
        ),
      ),
    );
  }
}

class CardListWidget extends StatelessWidget {

  List<ListItemData> dataList;

  CardListWidget({@required List<ListItemData> data}){
    this.dataList = data;
  }

  Widget _buildListView(){
    return new ListView.builder(
      itemExtent: ListItem.height,
      itemCount: dataList.length,
      padding: const EdgeInsets.all(12.0),
      itemBuilder: (context, index){
        return _buildRow(dataList[index]);
      },
    );
  }

  Widget _buildRow(ListItemData data) {
    return ListItem(data);
  }

  @override
  Widget build(BuildContext context) {
    return _buildListView();
  }
}

void main() => runApp(Main());

class Main extends StatelessWidget {

  List<ListItemData> data;

  void init(){
    var ld = ListItemData()
    ..desc = "desc"
    ..imgPath = "images/lake.jpg"
    ..title = "title"
    ..imgDesc = "";               // length == 0 !!!

    data = [ld, ld, ld];
  }

  @override
  Widget build(BuildContext context) {
    init();
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: new Text("Title"),
        ),
        body: CardListWidget(data: data),
        bottomNavigationBar: buildBottomBar(),
      ),
    );
  }

  Widget buildBottomBar(){
      return BottomNavigationBar(items: [
        BottomNavigationBarItem(title: Text("home"), icon: Icon(Icons.home)),
        BottomNavigationBarItem(title: Text("person"), icon: Icon(Icons.person))
      ]);
  }

}

════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following assertion was thrown during performLayout():
RenderCustomMultiChildLayoutBox object was given an infinite size during layout.
This probably means that it is a render object that tries to be as big as possible, but it was put inside another render object that allows its children to pick their own size.
The nearest ancestor providing an unbounded height constraint is: _RenderSingleChildViewport#3a931 relayoutBoundary=up14 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData:  (can use size)
...  constraints: BoxConstraints(0.0<=w<=411.4, 0.0<=h<=627.4)
...  layer: OffsetLayer#31aa2
...    offset: Offset(0.0, 0.0)
...  size: Size(411.4, 314.8)
The constraints that applied to the RenderCustomMultiChildLayoutBox were: BoxConstraints(0.0<=w<=371.4, 0.0<=h<=Infinity)
The exact size it was given was: Size(371.4, Infinity)
See https://flutter.dev/docs/development/ui/layout/box-constraints for more information.
User-created ancestor of the error-causing widget was:
Scaffold file:///C:/Users/Dharmesh%20Shah/AndroidStudioProjects/admin123/lib/widgets/ta.dart:32:12
When the exception was thrown, this was the stack:
#0      RenderBox.debugAssertDoesMeetConstraints. (package:flutter/src/rendering/box.dart:1953:9)
#1      RenderBox.debugAssertDoesMeetConstraints (package:flutter/src/rendering/box.dart:2021:6)
#2      RenderBox.size=. (package:flutter/src/rendering/box.dart:1738:7)
#3      RenderBox.size= (package:flutter/src/rendering/box.dart:1740:6)
#4      RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:355:5)
...
The following RenderObject was being processed when the exception was fired: RenderCustomMultiChildLayoutBox#8720e relayoutBoundary=up20 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  parentData:  (can use size)
...  constraints: BoxConstraints(0.0<=w<=371.4, 0.0<=h<=Infinity)
...  size: Size(371.4, Infinity)
RenderObject: RenderCustomMultiChildLayoutBox#8720e relayoutBoundary=up20 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
parentData:  (can use size)
constraints: BoxConstraints(0.0<=w<=371.4, 0.0<=h<=Infinity)
size: Size(371.4, Infinity)
...  child 1: RenderRepaintBoundary#5976f NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body
...    constraints: MISSING
...    size: MISSING
...    usefulness ratio: no metrics collected yet (never painted)
...    child: RenderCustomPaint#32257 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      parentData:
...      constraints: MISSING
...      size: MISSING
...      child: RenderRepaintBoundary#eb8f5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData:
...        constraints: MISSING
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#fc582 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          parentData:
...          constraints: MISSING
...          semantic boundary
...          size: MISSING
...  child 2: RenderConstrainedBox#f4c93 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.appBar
...    constraints: MISSING
...    size: MISSING
...    additionalConstraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=128.0)
...    child: RenderSemanticsAnnotations#11aad NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      parentData:
...      constraints: MISSING
...      semantic boundary
...      size: MISSING
...      child: RenderAnnotatedRegion#7cdf4 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData:
...        constraints: MISSING
...        size: MISSING
...        child: RenderPhysicalModel#e98e0 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData:
...          constraints: MISSING
...          size: MISSING
...          elevation: 4.0
...          color: MaterialColor(primary value: Color(0xff2196f3))
...          shadowColor: MaterialColor(primary value: Color(0xff2196f3))
...          shape: BoxShape.rectangle
...          borderRadius: BorderRadius.zero
...  child 3: RenderStack#74cef NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.floatingActionButton
...    constraints: MISSING
...    size: MISSING
...    alignment: centerRight
...    textDirection: ltr
...    fit: loose
...    overflow: clip
...    child 1: RenderTransform#06924 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      parentData: not positioned; offset=Offset(0.0, 0.0)
...      constraints: MISSING
...      size: MISSING
...      transform matrix: [0] 0.0,0.0,0.0,0.0
[1] 0.0,0.0,0.0,0.0
[2] 0.0,0.0,1.0,0.0
[3] 0.0,0.0,0.0,1.0
...      origin: null
...      alignment: center
...      textDirection: ltr
...      transformHitTests: true
...      child: RenderTransform#e187d NEEDS-LAYOUT NEEDS-PAINT
...        parentData:
...        constraints: MISSING
...        size: MISSING
...        transform matrix: [0] 0.7,0.7,0.0,0.0
[1] -0.7,0.7,0.0,0.0
[2] 0.0,0.0,1.0,0.0
[3] 0.0,0.0,0.0,1.0
...        origin: null
...        alignment: center
...        textDirection: ltr
...        transformHitTests: true
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ (2) Exception caught by rendering library ═════════════════════════════════════════════════
_RenderInkFeatures object was given an infinite size during layout.
User-created ancestor of the error-causing widget was:
Scaffold file:///C:/Users/Dharmesh%20Shah/AndroidStudioProjects/admin123/lib/widgets/ta.dart:32:12
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ (3) Exception caught by rendering library ═════════════════════════════════════════════════
RenderPhysicalModel object was given an infinite size during layout.
User-created ancestor of the error-causing widget was:
Scaffold file:///C:/Users/Dharmesh%20Shah/AndroidStudioProjects/admin123/lib/widgets/ta.dart:32:12
════════════════════════════════════════════════════════════════════════════════════════════════════
Reloaded 4 of 693 libraries in 1,027ms.
════════ (4) Exception caught by rendering library ═════════════════════════════════════════════════
RenderFlex object was given an infinite size during layout.
User-created ancestor of the error-causing widget was:
Container file:///C:/Users/Dharmesh%20Shah/AndroidStudioProjects/admin123/lib/widgets/registration.dart:21:18
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ (5) Exception caught by rendering library ═════════════════════════════════════════════════
RenderConstrainedBox object was given an infinite size during layout.
User-created ancestor of the error-causing widget was:
Container file:///C:/Users/Dharmesh%20Shah/AndroidStudioProjects/admin123/lib/widgets/registration.dart:21:18
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ (6) Exception caught by rendering library ═════════════════════════════════════════════════
RenderPositionedBox object was given an infinite size during layout.
User-created ancestor of the error-causing widget was:
SingleChildScrollView file:///C:/Users/Dharmesh%20Shah/AndroidStudioProjects/admin123/lib/widgets/registration.dart:19:13
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ (7) Exception caught by rendering library ═════════════════════════════════════════════════
RenderBox was not laid out: RenderRepaintBoundary#5976f NEEDS-LAYOUT NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1681 pos 12: 'hasSize'
User-created ancestor of the error-causing widget was:
Scaffold file:///C:/Users/Dharmesh%20Shah/AndroidStudioProjects/admin123/lib/widgets/ta.dart:32:12
════════════════════════════════════════════════════════════════════════════════════════════════════
i am getting this error when i m trying to create tabs
this is my code

import 'package:flutter/material.dart';

class MyTabbedPage extends StatefulWidget {
  const MyTabbedPage({ Key key }) : super(key: key);
  @override
  _MyTabbedPageState createState() => _MyTabbedPageState();
}

class _MyTabbedPageState extends State<MyTabbedPage> with SingleTickerProviderStateMixin {
  final List<Tab> myTabs = <Tab>[
    Tab(text: 'LEFT'),
    Tab(text: 'RIGHT'),
  ];

  TabController _tabController;

  @override
  void initState() {
    super.initState();
    _tabController = TabController(vsync: this, length: myTabs.length);
  }

  @override
  void dispose() {
    _tabController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        bottom: TabBar(
          controller: _tabController,
          tabs: myTabs,
        ),
      ),
      body: TabBarView(
        controller: _tabController,
        children: myTabs.map((Tab tab) {
          final String label = tab.text.toLowerCase();
          return Center(
            child: Text(
              'This is the $label tab',
              style: const TextStyle(fontSize: 36),
            ),
          );
        }).toList(),
      ),
    );
  }
}

All Possible Solution Added [Solved] Flutter: RenderBox was not laid out

authors: TheVegHunter blackredscarf fluttercorner1 goderbauer zoechi


text:
create Web view without dimensions

Is there a way of creating a web view without giving it a height so that it can be able to show me the whole content inside the widget's tree without the need of inserting gestureRecognizers for scrolling inside the fixed height that I have gave to the widget ...I have used the "flutter_html" package and it does not force me to give a height to the HTML widget and the container expand to contain the data automatically and I can not find this feature in the "web_view" package

I think this issue or concern should be on the plugins repo. Also if you are talking about creating apps, please consider posting on Stack Overflow.

the plugins repo led me to here ....and I posted the question on stack overflow, but I am sure that I won't find any answers concerning this topic

Hi, just want to check if this is still a problem for you with the latest version of web_view.

Could you please post the code where you add the WebView inside your other widgets?
This doesn't have to be a bug in Flutter.

Could you please post the code where you add the WebView inside your other widgets?
This doesn't have to be a bug in Flutter.
This is a simple example..
The code below won't work until I put the WebView inside a container any other widget with a fixed height and width or  it will throw the following Exception :

 Exception caught by rendering library ═════════════════════════════════════════════════ RenderIndexedSemantics object was given an infinite size during layout.
The code example :
class testClass extends StatelessWidget {   @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: Text("Test Screen"),       ),       body: Center(         child: ListView(           children: <Widget>[             Text("Heloo"),               Container(                 //height: 100.0,                // width: 320.0,                 child: WebView(                   initialUrl:Uri.dataFromString("", mimeType: "text/html",).toString(),                   javascriptMode: JavascriptMode.unrestricted,                 ),               ),             Text("Heloo"),           ],         ),       ),     );   } }

Yeah ok,  but isn't that to be expected? You put it inside a ListView so the child doesn't know anything about it's hight.
Does it also throw if you only provide a height?

I have tried using the same content with other packages like "flutter_widget_from_html" and "flutter_html" and it displayed the content without giving a fixed height or width and I found others asking the same question so opened the issue as a result...I do not know whether it is possible or not to display the content without dimensions here, but how the others managed to do it?

Best to have a look inside that packages or better use the Dart Devtools / Flutter inspector and compare how their widget tree looks like.

Closing as a duplicate of https://github.com/flutter/flutter/issues/34138 (which is newer, but has votes, and I don't want to lose the community votes there)

source: gharchive/issue

authors: ahmadkhedr escamoteur sampathbalivada stuartmorgan

repo: flutter/flutter

license_type: permissive

license_source: github-api


text:
Can not select text in the flutter webview

Hello,
Please find below my code :
The Webview renders well but I can not select the text on longpress

import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(

        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {}

  WebViewController _controller;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Help')),
      body: WebView(
        javascriptMode: JavascriptMode.unrestricted,
        initialUrl: '',
        onWebViewCreated: (WebViewController webViewController) {
          _controller = webViewController;
          _loadHtmlFromAssets();
        },
      ),
    );
  }

  _loadHtmlFromAssets() async {
    String fileText = """"
Main Title

A sub-title

This is some html. Look, here\'s an underline.

Look, this is emphasized. And here\'s some bold.

This is a UL list:

One

Two

Three

This is an OL list:

One

Two

Three

""";

    _controller.loadUrl(Uri.dataFromString(fileText,
            mimeType: 'text/html', encoding: Encoding.getByName('utf-8'))
        .toString());
  }
}

@ADLsourceCode This is a question better suited for StackOverflow, since there doesn’t seem to be anything wrong with Flutter itself. Closing, as this is not an issue report. See https://flutter.dev/community for support options.
If you disagree, feel free to comment and I will reopen the issue.

authors: ADLsourceCode BondarenkoStas


text:
Exception thrown when binaryMessenger.setMessageHandler called within EventChannel's receiveBroadcastStream method.

@dnfield
Steps to reproduce
I got the following exception on iOS while on master and dev flutter channels after runApp() had already been called. I added WidgetFlutterBinding.ensureInitialized() at the start of Main() as well as in the background Isolate entry function . This issue is not reproducible on Android on master and dev flutter channels or on stable channel on iOS. I am working on minimal repro code.
Logs
If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
#0      defaultBinaryMessenger.<anonymous closure>
package:flutter/…/services/binary_messenger.dart:73
#1      defaultBinaryMessenger
package:flutter/…/services/binary_messenger.dart:86
#2      EventChannel.binaryMessenger
package:flutter/…/services/platform_channel.dart:484
#3      EventChannel.receiveBroadcastStream.<anonymous closure>
package:flutter/…/services/platform_channel.dart:504
<asynchronous suspension>
#4      _runGuarded  (dart:async/stream_controller.dart:805:24)
#5      _BroadcastStreamController._subscribe  (dart:async/broadcast_stream_controller.dart:213:7)
#6      _ControllerStream._createSubscription  (dart:async/stream_controller.dart:818:19)
#7      _StreamImpl.listen  (dart:async/stream_impl.dart:472:9)
#8      FlutterIsolate._isolateInitialize
package:flutter_isolate/flutter_isolate.dart:104
#9      _flutterIsolateEntryPoint
package:flutter_isolate/flutter_isolate.dart:132
#10     _runMainZoned.<anonymous closure>.<anonymous closure>  (dart:ui/hooks.dart:229:25)
#11     _rootRun  (dart:async/zone.dart:1124:13)
#12     _CustomZone.run  (dart:async/zone.dart:1021:19)
#13     _runZoned  (dart:async/zone.dart:1516:10)
#14     runZoned  (dart:async/zone.dart:1500:12)
#15     _runMainZoned.<anonymous closure>  (dart:ui/hooks.dart:221:5)
#16     _startIsolate.<anonymous closure>  (dart:isolate-patch/isolate_patch.dart:305:19)
#17     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:172:12)
``

@dnfield
Steps to reproduce
I got the following exception on iOS while on master and dev flutter channels after runApp() had already been called. I added WidgetFlutterBinding.ensureInitialized() at the start of Main() as well as in the background Isolate entry function . This issue is not reproducible on Android on master and dev flutter channels or on stable channel on iOS.
Logs
If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
#0      defaultBinaryMessenger.<anonymous closure>
package:flutter/…/services/binary_messenger.dart:73
#1      defaultBinaryMessenger
package:flutter/…/services/binary_messenger.dart:86
#2      EventChannel.binaryMessenger
package:flutter/…/services/platform_channel.dart:484
#3      EventChannel.receiveBroadcastStream.<anonymous closure>
package:flutter/…/services/platform_channel.dart:504
<asynchronous suspension>
#4      _runGuarded  (dart:async/stream_controller.dart:805:24)
#5      _BroadcastStreamController._subscribe  (dart:async/broadcast_stream_controller.dart:213:7)
#6      _ControllerStream._createSubscription  (dart:async/stream_controller.dart:818:19)
#7      _StreamImpl.listen  (dart:async/stream_impl.dart:472:9)
#8      FlutterIsolate._isolateInitialize
package:flutter_isolate/flutter_isolate.dart:104
#9      _flutterIsolateEntryPoint
package:flutter_isolate/flutter_isolate.dart:132
#10     _runMainZoned.<anonymous closure>.<anonymous closure>  (dart:ui/hooks.dart:229:25)
#11     _rootRun  (dart:async/zone.dart:1124:13)
#12     _CustomZone.run  (dart:async/zone.dart:1021:19)
#13     _runZoned  (dart:async/zone.dart:1516:10)
#14     runZoned  (dart:async/zone.dart:1500:12)
#15     _runMainZoned.<anonymous closure>  (dart:ui/hooks.dart:221:5)
#16     _startIsolate.<anonymous closure>  (dart:isolate-patch/isolate_patch.dart:305:19)
#17     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:172:12)
``

Can you share the code that reproduces this?
Calling anything on widgetsbinding from a background isolate seems suspicious.

I have eliminated the use of Background isolate from my application so I don't face this issue anymore. The odd thing is that I can't repro it even if I un-comment the code below that spawns the isolate. I did a "flutter clean" and "flutter packages get". May be that did something. I will investigate it a bit more tomorrow.
  @override
  Widget build(BuildContext context) {
    switch (authStatus) {
      case AuthStatus.notDetermined:
        return _buildWaitingScreen();

      case AuthStatus.notSignedIn:
        return SignInScreen();

      case AuthStatus.signedIn:
        if((appState.user.hotelId == null) || (appState.user.hotelId.isEmpty)) {
          return _getHotelCode();
        }
        else {
          if ((Globals.receivePort == null) || (broadcastReceivePort == null)) {
 //port for this main isolate to receive messages.
            Globals.receivePort = ReceivePort();
/*
            print("Spawning isolate 1");
            FlutterIsolate.spawn(isolate1, Globals.receivePort.sendPort).then((
                data) =>
            Globals.isolate = data);
            broadcastReceivePort =  Globals.receivePort.asBroadcastStream();
        }
*/
          return HomePage(broadcastReceivePort);
        }
    }
  }

void isolate1(SendPort sendPort) async {
  //WidgetsFlutterBinding.ensureInitialized();
  Firestore firestore = Firestore.instance;
  ReceivePort newIsolateReceivePort = ReceivePort();
  StreamSubscription<QuerySnapshot> mgrPanicStream;

  BgGlobals.beaconInfo = "";
  sendPort.send(newIsolateReceivePort.sendPort);
  BgGlobals.boPanic = false;

  newIsolateReceivePort.listen((data) {
    //
    // Process the message
    //
    debugPrint("ISOLATE:Received $data");
 if (data.toString().startsWith("userId:")) {
      BgGlobals.userId = data.toString().substring(8).trim();
    }  else if (data.toString().startsWith("sosEmail:")) {
      BgGlobals.sosEmail = data.toString().substring(10).trim();
    } else if (data.toString().startsWith("sosSMS:")) {
      BgGlobals.sosSMS = data.toString().substring(9).trim();
    } else if (data.toString().startsWith("userEmail:")) {
      BgGlobals.userEmail = data.toString().substring(10).trim();
    } else if (data.toString().startsWith("userName:")) {
      BgGlobals.userName = data.toString().substring(10).trim();
    } else if (data.toString().startsWith("roomRoomId:")) {
      BgGlobals.roomRoomID = data.toString().substring(11).trim();
    } else if (data.toString().startsWith("taskRoomId:")) {
      BgGlobals.taskRoomID = data.toString().substring(11).trim();
    }
  });
}

Same problem after upgrade flutter.
[✓] Flutter (Channel master, v1.10.2-pre.12, on Linux, locale zh_CN.UTF-8)
    • Flutter version 1.10.2-pre.12 at /home/yucang/git/flutter
    • Framework revision 77f71ef48f (8 hours ago), 2019-09-10 10:32:27 +0900
    • Engine revision 7ea9884ab0
    • Dart version 2.5.0 (build 2.5.0-dev.4.0 be66176534)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/yucang/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /home/yucang/software/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] Android Studio (version 3.2)
    • Android Studio at /home/yucang/software/android-studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.36.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.4.1

[✓] Connected device (1 available)
    • Redmi 6A • 8835d2d87d25 • android-arm • Android 8.1.0 (API 27)

@telinx  - a small reproduction would be much appreciated.  AFAICT there isn't a reproduction for this issue yet.

@vikramkapoor - hope you don't mind, I moved the body of your second post into the top post, which looked like just the blank template, and removed the now duplicate post.

Is this issue iOS specific?

Without any additional information there is really nothing to do here.
I'm closing this issue as solved for the author, since they can't repro it anymore.
Could everyone who still has this problem please file a new issue with the exact description of what happens, your logs,  flutter doctor -v, and a minimal complete reproducible code sample.

authors: dnfield markusaksli-nc telinx vikramkapoor xster


text:
gradlew.bat exited abnormally when trying to run "default app"

Issue
I have a clean installation of Android Studio, etc. (following the steps here: https://www.youtube.com/watch?v=x0uinJvhNxI).
I created a default skeleton app by: flutter create first
flutter doctor finds no issues (see below), but the app will not run: Error running Gradle: ProcessException: Process "C:\Data\Devel\flutter\first\android\gradlew.bat" exited abnormally:
I see plenty of similar issues, but no apparent solution.
Please help.
Logs

C:\Data\Devel\flutter\first>flutter run --verbose
[  +16 ms] executing: [C:\Programs\flutter\] git log -n 1 --pretty=format:%H
[  +53 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f
[        ] executing: [C:\Programs\flutter\] git describe --match v*.*.* --first-parent --long --tags
[  +37 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[   +2 ms] v1.9.1+hotfix.2-0-g2d2a1ffec
[   +5 ms] executing: [C:\Programs\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[  +38 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] origin/stable
[        ] executing: [C:\Programs\flutter\] git ls-remote --get-url origin
[  +33 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +61 ms] executing: [C:\Programs\flutter\] git rev-parse --abbrev-ref HEAD
[  +36 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +64 ms] executing: C:\Users\LarsO\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +19 ms] Exit code 0 from: C:\Users\LarsO\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[   +1 ms] List of devices attached
           emulator-5554          device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86
           transport_id:2
[  +12 ms] C:\Users\LarsO\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell getprop
[  +47 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[  +77 ms] ro.hardware = ranchu
[  +25 ms] Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider
enabling
           software rendering with "--enable-software-rendering".
[  +14 ms] Launching lib\main.dart on Android SDK built for x86 in debug mode...
[   +8 ms] Initializing gradle...
[   +1 ms] Using gradle from C:\Data\Devel\flutter\first\android\gradlew.bat.
[  +80 ms] executing: C:\Data\Devel\flutter\first\android\gradlew.bat -v
[ +391 ms]
                    C:\Data\Devel\flutter\first>if "Windows_NT" == "Windows_NT" setlocal
                    C:\Data\Devel\flutter\first>set DEFAULT_JVM_OPTS=
                    C:\Data\Devel\flutter\first>set DIRNAME=C:\Data\Devel\flutter\first\android\
                    C:\Data\Devel\flutter\first>if "C:\Data\Devel\flutter\first\android\" == "" set DIRNAME=.
                    C:\Data\Devel\flutter\first>set APP_BASE_NAME=gradlew
                    C:\Data\Devel\flutter\first>set APP_HOME=C:\Data\Devel\flutter\first\android\
                    C:\Data\Devel\flutter\first>if defined JAVA_HOME goto findJavaFromJavaHome
                    C:\Data\Devel\flutter\first>set JAVA_HOME=C:\Program Files\Android\Android Studio\jre
                    C:\Data\Devel\flutter\first>set JAVA_EXE=C:\Program Files\Android\Android Studio\jre/bin/java.exe
                    C:\Data\Devel\flutter\first>if exist "C:\Program Files\Android\Android Studio\jre/bin/java.exe" goto init
                    C:\Data\Devel\flutter\first>if not "Windows_NT" == "Windows_NT" goto win9xME_args
                    C:\Data\Devel\flutter\first>if "@eval[2+2]" == "4" goto 4NT_args
                    C:\Data\Devel\flutter\first>set CMD_LINE_ARGS=
                    C:\Data\Devel\flutter\first>set _SKIP=2
                    C:\Data\Devel\flutter\first>if "x-v" == "x" goto execute
                    C:\Data\Devel\flutter\first>set CMD_LINE_ARGS=-v
                    C:\Data\Devel\flutter\first>goto execute
                    C:\Data\Devel\flutter\first>set CLASSPATH=C:\Data\Devel\flutter\first\android\\gradle\wrapper\gradle-wrapper.jar
                    C:\Data\Devel\flutter\first>"C:\Program Files\Android\Android Studio\jre/bin/java.exe" "-Dorg.gradle.appname=gradlew" -classpath
                    "C:\Data\Devel\flutter\first\android\\gradle\wrapper\gradle-wrapper.jar" org.gradle.wrapper.GradleWrapperMain -v

                    ------------------------------------------------------------
                    Gradle 5.4.1
                    ------------------------------------------------------------

                    Build time:   2019-04-26 08:14:42 UTC
                    Revision:     261d171646b36a6a28d5a19a69676cd098a4c19d

                    Kotlin:       1.3.21
                    Groovy:       2.5.4
                    Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
                    JVM:          1.8.0_202-release (JetBrains s.r.o 25.202-b03)
                    OS:           Windows 10 10.0 amd64

                    C:\Data\Devel\flutter\first>if "0" == "0" goto mainEnd
                    C:\Data\Devel\flutter\first>if "Windows_NT" == "Windows_NT" endlocal
[  +10 ms] Initializing gradle... (completed in 0.5s)
[   +1 ms] Resolving dependencies...
[   +1 ms] executing: [C:\Data\Devel\flutter\first\android\] C:\Data\Devel\flutter\first\android\gradlew.bat
app:properties
[+2273 ms]
                    C:\Data\Devel\flutter\first\android>if "Windows_NT" == "Windows_NT" setlocal
                    C:\Data\Devel\flutter\first\android>set DEFAULT_JVM_OPTS=
                    C:\Data\Devel\flutter\first\android>set DIRNAME=C:\Data\Devel\flutter\first\android\
                    C:\Data\Devel\flutter\first\android>if "C:\Data\Devel\flutter\first\android\" == "" set DIRNAME=.
                    C:\Data\Devel\flutter\first\android>set APP_BASE_NAME=gradlew
                    C:\Data\Devel\flutter\first\android>set APP_HOME=C:\Data\Devel\flutter\first\android\
                    C:\Data\Devel\flutter\first\android>if defined JAVA_HOME goto findJavaFromJavaHome
                    C:\Data\Devel\flutter\first\android>set JAVA_HOME=C:\Program Files\Android\Android Studio\jre
                    C:\Data\Devel\flutter\first\android>set JAVA_EXE=C:\Program Files\Android\Android Studio\jre/bin/java.exe

                    C:\Data\Devel\flutter\first\android>if exist "C:\Program Files\Android\Android Studio\jre/bin/java.exe" goto init
                    C:\Data\Devel\flutter\first\android>if not "Windows_NT" == "Windows_NT" goto win9xME_args
                    C:\Data\Devel\flutter\first\android>if "@eval[2+2]" == "4" goto 4NT_args
                    C:\Data\Devel\flutter\first\android>set CMD_LINE_ARGS=
                    C:\Data\Devel\flutter\first\android>set _SKIP=2
                    C:\Data\Devel\flutter\first\android>if "xapp:properties" == "x" goto execute
                    C:\Data\Devel\flutter\first\android>set CMD_LINE_ARGS=app:properties
                    C:\Data\Devel\flutter\first\android>goto execute
                    C:\Data\Devel\flutter\first\android>set CLASSPATH=C:\Data\Devel\flutter\first\android\\gradle\wrapper\gradle-wrapper.jar
                    C:\Data\Devel\flutter\first\android>"C:\Program Files\Android\Android Studio\jre/bin/java.exe" "-Dorg.gradle.appname=gradlew" -classpath "C:\Data\Devel\flutter\first\android\\gradle\wrapper\gradle-wrapper.jar" org.gradle.wrapper.GradleWrapperMain app:properties
                    > Configure project :app
                    WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
                    WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance. To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
                    WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
                    It will be removed at the end of 2019.
                    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
                    To determine what is calling variantOutput.getProcessResources(), use
                    -Pandroid.debug.obsoleteApi=true on the command line to display more information.
                    C:\Data\Devel\flutter\first\android>if "1" == "0" goto mainEnd
                    C:\Data\Devel\flutter\first\android>rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
                    C:\Data\Devel\flutter\first\android>rem the _cmd.exe /c_ return code!
                    C:\Data\Devel\flutter\first\android>if not "" == "" exit 1
                    C:\Data\Devel\flutter\first\android>exit /b 1
[   +7 ms] Resolving dependencies... (completed in 2.3s)
[   +4 ms] * Error running Gradle: ProcessException: Process "C:\Data\Devel\flutter\first\android\gradlew.bat" exited abnormally:
           C:\Data\Devel\flutter\first\android>if "Windows_NT" == "Windows_NT" setlocal
           C:\Data\Devel\flutter\first\android>set DEFAULT_JVM_OPTS=
           C:\Data\Devel\flutter\first\android>set DIRNAME=C:\Data\Devel\flutter\first\android\
           C:\Data\Devel\flutter\first\android>if "C:\Data\Devel\flutter\first\android\" == "" set DIRNAME=.
           C:\Data\Devel\flutter\first\android>set APP_BASE_NAME=gradlew
           C:\Data\Devel\flutter\first\android>set APP_HOME=C:\Data\Devel\flutter\first\android\
           C:\Data\Devel\flutter\first\android>if defined JAVA_HOME goto findJavaFromJavaHome
           C:\Data\Devel\flutter\first\android>set JAVA_HOME=C:\Program Files\Android\Android Studio\jre
           C:\Data\Devel\flutter\first\android>set JAVA_EXE=C:\Program Files\Android\Android Studio\jre/bin/java.exe
           C:\Data\Devel\flutter\first\android>if exist "C:\Program Files\Android\Android Studio\jre/bin/java.exe" goto init
           C:\Data\Devel\flutter\first\android>if not "Windows_NT" == "Windows_NT" goto win9xME_args
           C:\Data\Devel\flutter\first\android>if "@eval[2+2]" == "4" goto 4NT_args
           C:\Data\Devel\flutter\first\android>set CMD_LINE_ARGS=
           C:\Data\Devel\flutter\first\android>set _SKIP=2
           C:\Data\Devel\flutter\first\android>if "xapp:properties" == "x" goto execute
           C:\Data\Devel\flutter\first\android>set CMD_LINE_ARGS=app:properties
           C:\Data\Devel\flutter\first\android>goto execute
           C:\Data\Devel\flutter\first\android>set CLASSPATH=C:\Data\Devel\flutter\first\android\\gradle\wrapper\gradle-wrapper.jar

           C:\Data\Devel\flutter\first\android>"C:\Program Files\Android\Android Studio\jre/bin/java.exe" "-Dorg.gradle.appname=gradlew" -classpath "C:\Data\Devel\flutter\first\android\\gradle\wrapper\gradle-wrapper.jar" org.gradle.wrapper.GradleWrapperMain app:properties
           > Configure project :app
           WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with
'variant.getJavaCompileProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
           WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to
           display more information.
           WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with
           'variantOutput.getProcessResourcesProvider()'.
           It will be removed at the end of 2019.
           For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
           To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
           C:\Data\Devel\flutter\first\android>if "1" == "0" goto mainEnd
           C:\Data\Devel\flutter\first\android>rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
           C:\Data\Devel\flutter\first\android>rem the _cmd.exe /c_ return code!
           C:\Data\Devel\flutter\first\android>if not "" == "" exit 1
           C:\Data\Devel\flutter\first\android>exit /b 1
             Command: C:\Data\Devel\flutter\first\android\gradlew.bat app:properties

[   +8 ms] "flutter run" took 3,102ms.
Please review your Gradle project setup in the android/ folder.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      _readGradleProject (package:flutter_tools/src/android/gradle.dart:233:7)
<asynchronous suspension>
#2      _gradleAppProject (package:flutter_tools/src/android/gradle.dart:112:37)
<asynchronous suspension>
#3      getGradleAppOut (package:flutter_tools/src/android/gradle.dart:106:29)
<asynchronous suspension>
#4      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:164:23)
<asynchronous suspension>
#5      ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart:46:32)
<asynchronous suspension>
#6      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:359:56)
<asynchronous suspension>
#7      HotRunner.run (package:flutter_tools/src/run_hot.dart:254:39)
<asynchronous suspension>
#8      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:472:37)
<asynchronous suspension>
#9      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
#10     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#11     _rootRunUnary (dart:async/zone.dart:1132:38)
#12     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#13     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#15     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#16     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#17     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#18     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#19     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#20     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#21     _rootRunUnary (dart:async/zone.dart:1132:38)
#22     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#23     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#24     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#25     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#26     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#27     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#28     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#29     AndroidDevice.isLocalEmulator (package:flutter_tools/src/android/android_device.dart)
#30     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#31     _rootRunUnary (dart:async/zone.dart:1132:38)
#32     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#33     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#34     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#35     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#36     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#37     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#38     _rootRun (dart:async/zone.dart:1124:13)
#39     _CustomZone.run (dart:async/zone.dart:1021:19)
#40     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#41     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#42     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#43     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#44     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#45     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

Flutter Doctor

C:\Data\Devel\flutter\first>flutter doctor -v
[√] Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.18362.356], locale en-US)
    • Flutter version 1.9.1+hotfix.2 at C:\Programs\flutter
    • Framework revision 2d2a1ffec9 (2 weeks ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\LarsO\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!

Bump.  Anybody?

Hi, I would like to ask if you were able to solve this problem in the meantime?
Seems to be the same as https://github.com/flutter/flutter/issues/41766

Yes and no.  I created a new project ("flutter create...") and this time it ran fine.  Go figure.  It sure would have been nice to have a more descriptive error message.

Thanks for the fast reply. Yes we are working on improving error messages.


text:
StatelessWidge

Steps to Reproduce

...
...
...

Target Platform:
Target OS version/browser:
Devices:
Logs

I am beginner to flutter and can not resolve this error : type 'MenuDashboardPage' is not a subtype of type 'StatelessWidget'
plz help to resolve

@siddharthninawe You should ask this in StackOverflow. This platform is not suitable for this.

Hi @siddharthninawe
I do agree with @GowthamF :
this platform is not met for assistance on personal code.
Please see https://flutter.dev/community for resources for asking questions like this,
you may also get some help if you post it on Stack Overflow.
Closing, as this isn't an issue with Flutter itself,
if you disagree please write in the comments and I will reopen it
Thank you

authors: GowthamF iapicca siddharthninawe


text:
Unable to load asset: assets/i18n/en.json

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
E/flutter ( 8334): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Unable to load asset: assets/i18n/en.json
E/flutter ( 8334): #0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)

Steps to Reproduce
Create a new project. Try to access an asset file.
pubscpec.yaml:
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  assets:
    - assets/i18n/en.json
    - assets/i18n/de.json

I need more details to answer your problem.
if it's possible, can you show project structure to us?

Hi @mscherer82
can you please provide your flutter doctor -v ,
your flutter run --verbose
and if possible a reproducible minimal code sample.
Thank you

Thanks. It seems to be an issue of android studio. I created a new project, flutter clean, and flutter run and I'm still getting this error although the assets aren't used in the new project. So I will close this ticket and open one for android studio.

authors: Nyamkhuub iapicca mscherer82


text:
porblem build apk

Hi guys .... All running ok in Emulator but when i try to build apk to android store ... !!!! Surprice !!! :(
C:\flutter\bin\flutter.bat --no-color build apk
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...
FAILURE: Build failed with an exception.

What went wrong:

Could not determine the dependencies of task ':app:lintVitalRelease'.

Could not resolve all artifacts for configuration ':app:debugAndroidTestCompileClasspath'.

Could not find androidx.test:runner:1.2.1.

 Required by:

     project :app

Could not find androidx.test.espresso:espresso-core:3.2.1.

 Required by:

     project :app

Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 5s
Running Gradle task 'assembleRelease'...                            6,6s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
✏  Creating android\settings_aar.gradle...                        3ms
√ android\settings_aar.gradle created successfully.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...
The plugin cloud_firestore could not be built due to the issue above.
And now ????? Helppp

did you migrated your project for AndroidX if not then see this

@daniele777 did migrating help you?

When i cretaed project i already flag androidx ... dosen't work ? Unfortunally now i can't try .to migrate .i'm away from my pc ...but .... Possibile i'll ti click signed apk ?

Hi @daniele777
can you please provide your flutter doctor -v ,
your flutter build apk --verbose,
and your pubspec.yaml
Thank you

ok... flutter doctor v..
` Microsoft Windows [Versione 10.0.18363.657]
(c) 2019 Microsoft Corporation. Tutti i diritti sono riservati.
C:\Users\Daniel_tech\Documents\csf_2020\csf2020>flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Versione 10.0.18363.657], locale it-IT)
• Flutter version 1.12.13+hotfix.8 at C:\flutter
• Framework revision 0b8abb4724 (7 days ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at E:\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = E:\Android\Sdk
• ANDROID_SDK_ROOT = E:\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.41.1)
• VS Code at C:\Users\Daniel_tech\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.7.1
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
`
pubspec.yaml
name: csf_2020
description: A new Flutter application.
The following defines the version and build number for your application.
A version number is three numbers separated by dots, like 1.2.43
followed by an optional build number separated by a +.
Both the version and the builder number may be overridden in flutter
build by specifying --build-name and --build-number, respectively.
In Android, build-name is used as versionName while build-number used as versionCode.
Read more about Android versioning at https://developer.android.com/studio/publish/versioning
In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
Read more about iOS versioning at
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 7.0.0
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
The following adds the Cupertino Icons font to your application.
Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
cloud_firestore: ^0.12.10+2
google_maps_flutter: ^0.5.21+12
geolocator: ^5.1.5
rxdart: ^0.22.6
rflutter_alert: ^1.0.2
google_sign_in: ^4.1.1
firebase_auth: ^0.15.3+1
firebase_admob: ^0.9.0+10
dev_dependencies:
flutter_test:
sdk: flutter
For information on the generic Dart part of this file, see the
following page: https://dart.dev/tools/pub/pubspec
The following section is specific to Flutter.
flutter:
The following line ensures that the Material Icons font is
included with your application, so that you can use the icons in
the material Icons class.
uses-material-design: true
To add assets to your application, add an assets section, like this:
assets:
- assets/flutter-icon.png
- assets/destination.png
- assets/fontana.png
- assets/superpoi.png
- assets/userlocation.png
- assets/googlelogo.png
- assets/image.png
- assets/google_logo.png
- images/a_dot_ham.jpeg
An image asset can refer to one or more resolution-specific "variants", see
https://flutter.dev/assets-and-images/#resolution-aware.
For details regarding adding assets from package dependencies, see
https://flutter.dev/assets-and-images/#from-packages
To add custom fonts to your application, add a fonts section here,
in this "flutter" section. Each entry in this list should have a
"family" key with the font family name, and a "fonts" key with a
list giving the asset and other descriptors for the font. For
example:
fonts:
- family: Schyler
fonts:
- asset: fonts/Schyler-Regular.ttf
- asset: fonts/Schyler-Italic.ttf
style: italic
- family: Trajan Pro
fonts:
- asset: fonts/TrajanPro.ttf
- asset: fonts/TrajanPro_Bold.ttf
weight: 700

For details regarding fonts from package dependencies,
see https://flutter.dev/custom-fonts/#from-packages
[  +37 ms] executing: [C:\flutter] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +61 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 0b8abb4724aa590dd0f429683339b1e045a1594d
[        ] executing: [C:\flutter] git describe --match v*.. --first-parent --long --tags
[  +39 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags
[        ] v1.12.13+hotfix.8-0-g0b8abb472
[  +12 ms] executing: [C:\flutter] git rev-parse --abbrev-ref --symbolic @{u}
[  +34 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [C:\flutter] git ls-remote --get-url origin
[  +31 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +84 ms] executing: [C:\flutter] git rev-parse --abbrev-ref HEAD
[  +35 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +77 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[  +18 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +178 ms] Found plugin cloud_firestore at C:\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.12.11
[  +48 ms] Found plugin firebase_admob at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_admob-0.9.0+10
[  +12 ms] Found plugin firebase_auth at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.15.4
[  +17 ms] Found plugin firebase_auth_web at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth_web-0.1.2
[  +11 ms] Found plugin firebase_core at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core-0.4.3+2
[  +17 ms] Found plugin firebase_core_web at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core_web-0.1.1+2
[  +39 ms] Found plugin geolocator at C:\flutter.pub-cache\hosted\pub.dartlang.org\geolocator-5.2.1
[   +7 ms] Found plugin google_api_availability at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_api_availability-2.0.2
[   +8 ms] Found plugin google_maps_flutter at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-0.5.21+17
[   +9 ms] Found plugin google_sign_in at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.1.1
[  +16 ms] Found plugin google_sign_in_web at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_sign_in_web-0.8.3
[  +41 ms] Found plugin location_permissions at C:\flutter.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.4+1
[ +253 ms] Found plugin cloud_firestore at C:\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.12.11
[  +11 ms] Found plugin firebase_admob at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_admob-0.9.0+10
[   +4 ms] Found plugin firebase_auth at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.15.4
[   +6 ms] Found plugin firebase_auth_web at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth_web-0.1.2
[   +2 ms] Found plugin firebase_core at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core-0.4.3+2
[   +4 ms] Found plugin firebase_core_web at C:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core_web-0.1.1+2
[   +8 ms] Found plugin geolocator at C:\flutter.pub-cache\hosted\pub.dartlang.org\geolocator-5.2.1
[   +2 ms] Found plugin google_api_availability at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_api_availability-2.0.2
[   +1 ms] Found plugin google_maps_flutter at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-0.5.21+17
[  +34 ms] Found plugin google_sign_in at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.1.1
[   +5 ms] Found plugin google_sign_in_web at C:\flutter.pub-cache\hosted\pub.dartlang.org\google_sign_in_web-0.8.3
[   +5 ms] Found plugin location_permissions at C:\flutter.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.4+1
[ +334 ms] Generating C:\Users\Daniel_tech\Documents\csf_2020\csf2020\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +102 ms] You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
[   +1 ms] If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
[        ]     To generate an app bundle, run:
[        ]         flutter build appbundle --target-platform android-arm,android-arm64,android-x64
[        ]         Learn more on: https://developer.android.com/guide/app-bundle
[        ]     To split the APKs per ABI, run:
[        ]         flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
[        ]         Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
[  +39 ms] Running Gradle task 'assembleRelease'...
[   +2 ms] gradle.properties already sets android.enableR8
[  +15 ms] Using gradle from C:\Users\Daniel_tech\Documents\csf_2020\csf2020\android\gradlew.bat.
[  +13 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +141 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[        ] openjdk version "1.8.0_202-release"
OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
OpenJDK 64-Bit Server VM (build 25.202-b03, mixed mode)
[   +3 ms] executing: [C:\Users\Daniel_tech\Documents\csf_2020\csf2020\android] C:\Users\Daniel_tech\Documents\csf_2020\csf2020\android\gradlew.bat -Pverbose=true
-Ptarget=lib\main.dart -Ptrack-widget-creation=true -Pshrink=true -Ptarget-platform=android-arm,android-arm64,android-x64 assembleRelease
[+6460 ms] Starting a Gradle Daemon, 1 busy and 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
[+48586 ms] FAILURE: Build failed with an exception.
[   +7 ms] * What went wrong:
[   +1 ms] Could not determine the dependencies of task ':app:lintVitalRelease'.
[   +1 ms] > Could not resolve all artifacts for configuration ':app:debugAndroidTestCompileClasspath'.
[   +1 ms]    > Could not find androidx.test:runner:1.2.1.
[   +8 ms]      Required by:
[        ]          project :app
[   +1 ms]    > Could not find androidx.test.espresso:espresso-core:3.2.1.
[        ]      Required by:
[        ]          project :app
[   +3 ms] * Try:
[   +2 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[   +1 ms] * Get more help at https://help.gradle.org
[   +1 ms] BUILD FAILED in 54s
[ +457 ms] Running Gradle task 'assembleRelease'... (completed in 55,7s)
[   +3 ms] The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
[   +8 ms] Building plugin cloud_firestore...
[  +20 ms] Running Gradle task 'assembleAarRelease'...
[   +7 ms] "flutter apk" took 57.136ms.
The plugin cloud_firestore could not be built due to the issue above.
#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      buildPluginsAsAar (package:flutter_tools/src/android/gradle.dart:726:7)
#2      _asyncErrorWrapperHelper. (dart:async-patch/async_patch.dart:80:45)
#3      _rootRunBinary (dart:async/zone.dart:1146:38)
#4      _CustomZone.runBinary (dart:async/zone.dart:1039:19)
#5      _FutureListener.handleError (dart:async/future_impl.dart:153:20)
#6      Future._propagateToListeners.handleError (dart:async/future_impl.dart:692:47)
#7      Future._propagateToListeners (dart:async/future_impl.dart:713:24)
#8      Future._completeError (dart:async/future_impl.dart:532:5)
#9      Future._asyncCompleteError. (dart:async/future_impl.dart:580:7)
#10     _rootRun (dart:async/zone.dart:1126:13)
#11     _CustomZone.run (dart:async/zone.dart:1023:19)
#12     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#13     _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23)
#14     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)
Thanks....

i already have androidx... this is my gradle.properties..
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

Hi @daniele777
Could you try with the latest version of cloud_firestore 0.13.2+1?

Solved changing
androidTestImplementation 'androidx.test:runner:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.1'
with !!!!
androidTestImplementation 'androidx.test:runner:1.3.0-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'

I added this and it works for me:
`Open your build.gradle file and add the code below under android:
android {
lintOptions { checkReleaseBuilds false }`

authors: VladyslavBondarenko aburcheri as-Tony-Stark daniele777 iapicca