Skip to content

JS: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.nxtra/files/app/img/1.png (No such file or directory) #2280

@aks84

Description

@aks84

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI:
  • Cross-platform modules:
  • Android Runtime:
  • NativeScript-Angular:
  • Angular:

nativescript ng image error

Description
It does not find the images under /img folder

<ActionBar title="Details"></ActionBar>
<FlexboxLayout flexDirection="column">
<FlexboxLayout class="m-15">
<Label class="h2" [text]="item.id + '. '"></Label>
<Label class="h2" [text]="item.name"></Label>
</FlexboxLayout>
<Label class="h4 m-15" [text]="item.role"></Label>
<Image src="~/img/{{item.id}}.png"></Image>
</FlexboxLayout>

I have /img folder under /app

And a few images in /img folder

  • 1.png
  • 2.png
  • 3.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions