Error in downloadBitmap - java.io.IOException: Unable to connect to: file://data/data/

alex-1999

New member
May 2, 2024
1
0
1
Visit site
I define iconRef in Angular Nativescript code as:

<Image #icon />
@ViewChild("icon", { static: false }) iconRef: ElementRef;

and try dynamically changing image as

this.iconRef.nativeElement.src=`file:/${this.getfullIconPath(this.iconPath)}`

file .png is present, I'm sure that file present and path is correct. I can see file on Android studio

JavaError-05012024_232655_1.png

However I receive error

Error in downloadBitmap - java.io.IOException: Unable to connect to: file://data/data/...
Missing Image with resourceID: file://data/data/...

What going wrong?

During last 2 days I try to use a lot of other variants, from adding refresh point

.then((x) => (this.iconRef.nativeElement.src = `${this.iconPath}${"?ts=" + new Date().getTime()}`))

to change folder to ~/assets and, but still failed

Nativescript-05042024_003943-1.png

image present and can be opened by Android Studio

Nativescript-05032024_235859_1.png

however upload it to Image control is impossible. Why? Any ideas?
 
Last edited:

Members online

Trending Posts

Forum statistics

Threads
943,722
Messages
6,919,758
Members
3,159,181
Latest member
raykv23