Home     RSSRSS

Native Script Angular adding Images Resources – Error in downloadBitmap – java.net.MalformedURLException: no protocol:

September 4, 2019 by kiranbadi1991 | Filed under Browser, Development.

Just in case if you are ever getting this error with Native script Angular Framework while trying to add images from local file system and trying to preview it via playground app.

Error in downloadBitmap – java.net.MalformedURLException: no protocol: ./app/images/home.jpg

Try doing it this way

<Image src=”~/app/images/home.jpg” stretch=”none”></Image>
Trick here in debugging this is to follow the logs on the device and then adjust path for resources accordingly.
LOG from device Kiran Badi: HMR:          ↻ ./app/home/home.component.ts
LOG from device Kiran Badi: HMR:          ↻ ./app/home/home.module.ts

 

← Previous

Comments are disabled