title: Troubleshooting Flutter Error: Unable to load asset
body: <p>I've tried everything from every modification of the pubspec.yaml file, flutter clean, updating flutter and my IDE (Android Studio). Nothing seems to be working.</p>
  <p>Building a money tracker app in the case that no transactions are on the page the image displays.</p>
  <p>Path of image file:</p>
  <pre><code>lib/assets/images/waiting.png
  </code></pre>
  <p>Code:</p>
  <pre><code>return Container(
        height: 300,
        child: transactions.isEmpty
            ? Column(
                children: &lt;Widget&gt;[
                  Text(
                    'No Transactions yet',
                    style: TextStyle(
                      fontWeight: FontWeight.bold,
                      fontSize: 20.0,
                    ),
                  ),
                  Container(
                    height: 200,
                    child: Image.asset(
                      'assets/images/waiting.png',
                      fit: BoxFit.cover,
                    ),
                  ),
                ],
              )
            : ListView.builder(
                itemBuilder: (context, index) {
                  return Container(
                    margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
                    padding: EdgeInsets.all(3.0),
                    decoration: BoxDecoration(
                      gradient: LinearGradient(colors: _txColors),
                      border: Border.all(color: Colors.grey, width: 2.0),
                      borderRadius: BorderRadius.all(
                        Radius.circular(15.0),
                      ),
                      color: Colors.greenAccent,
                    ),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                      children: &lt;Widget&gt;[
                        Container(
                          child: Text(
                            '\$${transactions[index].amount.toStringAsFixed(2)}',
                            style: TextStyle(
                              fontWeight: FontWeight.bold,
                              fontSize: 20.0,
                              color: Colors.white,
  //                    Color(0xffC5CED4),
                            ),
                          ),
                        ),
  </code></pre>
  <p>Pubspec.yaml:</p>
  <pre><code>flutter:
  uses-material-design: true
  assets:
    - assets/images/
  </code></pre>
  <p>Error:</p>
  <pre><code>I/flutter ( 5679): ══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
  I/flutter ( 5679): The following assertion was thrown resolving an image codec:
  I/flutter ( 5679): Unable to load asset: assets/images/waiting.png
  I/flutter ( 5679): 
  I/flutter ( 5679): When the exception was thrown, this was the stack:
  I/flutter ( 5679): #0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
  I/flutter ( 5679): &lt;asynchronous suspension&gt;
  I/flutter ( 5679): #1      AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:664:31)
  I/flutter ( 5679): #2      AssetBundleImageProvider.load (package:flutter/src/painting/image_provider.dart:648:14)
  I/flutter ( 5679): #3      ImageProvider.resolveStreamForKey.&lt;anonymous closure&gt; (package:flutter/src/painting/image_provider.dart:501:13)
  I/flutter ( 5679): #4      ImageCache.putIfAbsent (package:flutter/src/painting/image_cache.dart:359:22)
  I/flutter ( 5679): #5      ImageProvider.resolveStreamForKey (package:flutter/src/painting/image_provider.dart:499:80)
  I/flutter ( 5679): #6      ScrollAwareImageProvider.resolveStreamForKey (package:flutter/src/widgets/scroll_aware_image_provider.dart:106:19)
  I/flutter ( 5679): #7      ImageProvider.resolve.&lt;anonymous closure&gt; (package:flutter/src/painting/image_provider.dart:330:9)
  I/flutter ( 5679): #8      ImageProvider._createErrorHandlerAndKey.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:flutter/src/painting/image_provider.dart:460:26)
  I/flutter ( 5679): (elided 13 frames from dart:async)
  I/flutter ( 5679): 
  I/flutter ( 5679): Image provider: AssetImage(bundle: null, name: &quot;assets/images/waiting.png&quot;)
  I/flutter ( 5679): Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#288b8(), name:
  I/flutter ( 5679):   &quot;assets/images/waiting.png&quot;, scale: 1.0)
  I/flutter ( 5679): ════════════════════════════════════════════════════════════════════════════════════════════════════
  </code></pre>