Reputation: 51
i follow this course: https://courses.nativescripting.com/courses/nativescript-core-getting-started-guide/lectures/2564661 I tried to follow and my code is:
<Page loaded="pageLoaded">
<ActionBar title="My App" class="action-bar"></ActionBar>
<!-- Your UI components go here -->
<Image src="~\images\apple.jpg" ></Image>
</Page>
but it not show the picture in android emulator and some message error:
JS: Error in downloadBitmap - java.net.MalformedURLException: no protocol: HellWorld\app\images\apple.jpg
Upvotes: 1
Views: 2210
Reputation: 598
Images in {N} are usually processed with tags such as:
src="res://apple"
See https://docs.nativescript.org/ui/image-resources
Upvotes: 1