playground-feedback icon indicating copy to clipboard operation
playground-feedback copied to clipboard

Error in reading bitmap - java.io.FileNotFoundException

Open michelkal opened this issue 6 years ago • 1 comments

When I preview the app online itr works fine. Same version downloaded on my local app return below error. Images not loading.

LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/next.png (No such file or directory) LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/login-illustration.png (No such file or directory) LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/login-illustration.png (No such file or directory) LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/next.png (No such file or directory) LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/next.png (No such file or directory) LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/login-illustration.png (No such file or directory) LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/next.png (No such file or directory) LOG from device Galaxy S6 edge: Error in reading bitmap - java.io.FileNotFoundException: /data/data/org.nativescript.preview/files/app/App_Resources/login-illustration.png (No such file or directory)

michelkal avatar Jun 28 '19 13:06 michelkal

Hi @michelkal , The App_Resources folder name is reserved for platform specific assets and this causes the described behavior. Android specific files are stored in App_Resources\Android and iOS specific files in App_Resources\iOS respectively.

If you rename the folder containing the images to something else(images for example) and update the link inside your .html file, everything should work as expected. You can read more about referencing images here.

KristianDD avatar Jul 18 '19 10:07 KristianDD