react native - Error when add image to project -
i created project , added image in project root directory.
in index.android.js added:
when run react-native run android, error displayed:
error: bundling failed: "unable resolve module ./my-icon.png
c:\\users\\ayala\\documents\\developer\\react\\brunodantas\\index.android.js
: not resolve `c:\users\ayala\documents\developer\react\brunodantas\my-icon.png' folder: did not contain package, nor index file"
the problem path think code example missing. problem image not able found.
currently code believe?
<image source={require('./my-icon.png')} />
this means image should in same folder index.android.js i'm guessing it's not... need more information in order tell real problem is.
Comments
Post a Comment