You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
showing error No file or variants found for asset: loadjson/person.json. #17283
I am getting the same error now too. Any solution for this?
- images/light_rain.png
- images/umbrella.png
- images/white_snow.png
That's on my pubspec.yaml, but I get the error:
Error detected in pubspec.yaml:
No file or variants found for asset: images/umbrella.png.
Not sure what's going on.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
cc @Hixie
I also encountered this, in my case it was I think more user error than anything else. I placed my image folder in the lib folder, so I needed to put lib/ in front of the path. Worth checking for anyone who comes across this bug report.
i got the same error but later i realized that i m making the image( or asset) folder inside the lib folder. but that has to be made outside the lib folder.
please check the image below for reference. Hope it helps :-)
Reacted by vikrantsingh123, Pratima Mohan, Muthyala Srikar, Edson Catugy, Ruhasi, Swati Sharma, Eric Agustian and Andreas Karlsson
I was facing the same problem , and I had two mistakes:
1- I created the "images" folder inside the "lib" folder , and it should be outside the lib folder , it should be in the app root folder.
It should be spaces from the starter line , and should appear a grey line , like this
i got the same error but later i realized that i m making the image( or asset) folder inside the lib folder. but that has to be made outside the lib folder.
please check the image below for reference. Hope it helps :-)
I was facing the same problem , and I had two mistakes:
1- I created the "images" folder inside the "lib" folder , and it should be outside the lib folder , it should be in the app root folder.
It should be spaces from the starter line , and should appear a grey line , like this
Hope it helps you
Bro, I tried... It did not work. After tried all solutions given above.... the error did not resolves
I was facing the same problem , and I had two mistakes:
1- I created the "images" folder inside the "lib" folder , and it should be outside the lib folder , it should be in the app root folder.
It should be spaces from the starter line , and should appear a grey line , like this
Hope it helps you
Bro, I tried... It did not work. After tried all solutions given above.... the error did not resolves
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
zoechi commentedon May 8, 2018
What action causes this error?
Please add the output of
flutter doctor?pdichone commentedon May 30, 2018
I am getting the same error now too. Any solution for this?
tobyokeke commentedon Jun 13, 2018
Im getting this as well and there are files in the right place and i'm using
-assets/images/zoechi commentedon Jun 13, 2018
@tobyokeke Currently all files need to be listed individually.
The new feature to resolve a directory entry to its containing files is available in master but not yet in beta: https://github.com/flutter/flutter/pull/16413/files
I think you need a space after
-https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.htmltobyokeke commentedon Jun 13, 2018
Thank you. Individual listing worked.
no-response commentedon Aug 19, 2018
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
cc @Hixie
austenstrine commentedon Aug 16, 2019
I also encountered this, in my case it was I think more user error than anything else. I placed my image folder in the lib folder, so I needed to put lib/ in front of the path. Worth checking for anyone who comes across this bug report.
abuzarsaddiqui commentedon Sep 11, 2019
If this is the scenario:
assets -> images -> pic.png
then define your asset like this
assets:
- assets/images/pic.png
egidiocs commentedon Oct 27, 2019
this is correct, for Android! The documentation: https://flutter.dev/docs/development/ui/assets-and-images#android
for iOS refer to: https://flutter.dev/docs/development/ui/assets-and-images#ios
SOURAVTIWARI01 commentedon Jan 2, 2020
Hi All,
i got the same error but later i realized that i m making the image( or asset) folder inside the lib folder. but that has to be made outside the lib folder.

please check the image below for reference. Hope it helps :-)
pahoel commentedon Feb 26, 2020
Pubspec.yaml:
assets:
- assets/sounds/alarm.mp3
- images/a_dot_ham.jpeg
main.dart:
int soundId = await rootBundle.load("assets/sounds/alarm.mp3")......
sk67dev commentedon Mar 23, 2020
Hi, I had the same problem where the image wouldn't appear and have managed to get it to work by:
assets:- gym_logo.pngflutter-team-archive/engine@2d42c74...d7ad50c
1 remaining item
ihongx commentedon May 24, 2020
Just rename the file name then it works.
sunaarun commentedon Sep 30, 2020
I was facing the same problem , and I had two mistakes:

1- I created the "images" folder inside the "lib" folder , and it should be outside the lib folder , it should be in the app root folder.
It should be spaces from the starter line , and should appear a grey line , like this

Hope it helps you
swatkat1127 commentedon Oct 23, 2020
swatkat1127 commentedon Oct 23, 2020
Thanks..It helped
harisdin commentedon Jan 25, 2021
it work for me
Taoufik32 commentedon May 20, 2021
Thanks
maitisoumyajit commentedon Jul 9, 2021
Bro, I tried... It did not work. After tried all solutions given above.... the error did not resolves

sunaarun commentedon Jul 14, 2021
try to add another space
SOURAVTIWARI01 commentedon Jul 14, 2021
@sunaarun How can we connect bro ?
Lets screen share and see your issue
maitisoumyajit commentedon Jul 15, 2021
sunaarun commentedon Jul 18, 2021
@SOURAVTIWARI01 is the problem still there
maitisoumyajit commentedon Jul 22, 2021
github-actions commentedon Aug 5, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.