Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset Exception #403

Closed
rajputvarun591 opened this issue Jan 25, 2020 · 1 comment
Closed

Asset Exception #403

rajputvarun591 opened this issue Jan 25, 2020 · 1 comment

Comments

@rajputvarun591
Copy link

Restarted application in 2,431ms.
E/flutter ( 6766): [ERROR:flutter/lib/ui/ui_dart_state.cc(144)] Unhandled Exception: Unable to load asset: assets/audios/dunia_standing_by_u.mp3
E/flutter ( 6766): #0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
E/flutter ( 6766):
E/flutter ( 6766): #1 AudioCache._fetchAsset (package:audioplayers/audio_cache.dart:57:29)
E/flutter ( 6766):
E/flutter ( 6766): #2 AudioCache.fetchToMemory (package:audioplayers/audio_cache.dart:64:30)
E/flutter ( 6766):
E/flutter ( 6766): #3 AudioCache.load (package:audioplayers/audio_cache.dart:79:37)
E/flutter ( 6766):
E/flutter ( 6766): #4 AudioCache.play (package:audioplayers/audio_cache.dart:98:23)
E/flutter ( 6766):
E/flutter ( 6766): #5 _MyAudioPlayerState._play (package:audio_station/my_audio_player.dart:28:17)
E/flutter ( 6766): #6 _MyAudioPlayerState.build. (package:audio_station/my_audio_player.dart:22:74)
E/flutter ( 6766): #7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14)
E/flutter ( 6766): #8 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:789:36)
E/flutter ( 6766): #9 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter ( 6766): #10 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
E/flutter ( 6766): #11 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
E/flutter ( 6766): #12 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7)
E/flutter ( 6766): #13 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9)
E/flutter ( 6766): #14 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12)
E/flutter ( 6766): #15 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:117:9)
E/flutter ( 6766): #16 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter ( 6766): #17 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18)
E/flutter ( 6766): #18 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7)
E/flutter ( 6766): #19 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19)
E/flutter ( 6766): #20 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter ( 6766): #21 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter ( 6766): #22 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter ( 6766): #23 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter ( 6766): #24 _rootRunUnary (dart:async/zone.dart:1136:13)
E/flutter ( 6766): #25 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter ( 6766): #26 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
E/flutter ( 6766): #27 _invoke1 (dart:ui/hooks.dart:273:10)
E/flutter ( 6766): #28 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5)
E/flutter ( 6766):

@luanpotter
Copy link
Member

You need to add assets/audios/dunia_standing_by_u.mp3 to your pubspec.yaml as an asset so you can access it. Please read the documentation from AudioCache here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants