Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25445] Error loading images from res-ldpi, res-hdpi, ect. folders on Android 7.1.1

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2018-08-30T02:22:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterILAY SENER
AssigneeUnknown
Created2017-10-26T00:54:22.000+0000
Updated2018-08-30T02:22:32.000+0000

Description

When using image folders 'res-ldpi/mdpi/hdpi/xhdpi/xxhdpi/xxxhdpi' for app running on Android Emulator (7.1.1), studio generates following errors and none of the images from these folders are NOT loaded... [WARN] : TiDrawableReference: (pool-3-thread-2) [0,671] Could not open stream to get bitmap [ERROR] : TiDrawableReference: (pool-3-thread-1) [89,760] Problem opening stream with url /images/ic_key.png: Resources/images/ic_key.png [ERROR] : TiDrawableReference: java.io.FileNotFoundException: Resources/images/ic_key.png [ERROR] : TiDrawableReference: at android.content.res.AssetManager.openAsset(Native Method) [ERROR] : TiDrawableReference: at android.content.res.AssetManager.open(AssetManager.java:347) [ERROR] : TiDrawableReference: at android.content.res.AssetManager.open(AssetManager.java:321) [ERROR] : TiDrawableReference: at org.appcelerator.titanium.util.TiFileHelper.openInputStream(TiFileHelper.java:222) [ERROR] : TiDrawableReference: at org.appcelerator.titanium.view.TiDrawableReference.getInputStream(TiDrawableReference.java:863) [ERROR] : TiDrawableReference: at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:346) [ERROR] : TiDrawableReference: at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:303) [ERROR] : TiDrawableReference: at org.appcelerator.titanium.util.TiLoadImageManager$LoadImageJob.run(TiLoadImageManager.java:128) [ERROR] : TiDrawableReference: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) [ERROR] : TiDrawableReference: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) [ERROR] : TiDrawableReference: at java.lang.Thread.run(Thread.java:761) [WARN] : TiDrawableReference: (pool-3-thread-1) [2,762] Could not open stream to get bitmap To create the error, change the DPI specific folders in assets/android/images/ to res-hdpi, res-mdpi, etc and access an image from these folders from your app. Use the following code to replicate the issue:

Attachments

FileDateSize
ic_key.png2017-10-26T00:53:50.000+0000636
Screen Shot 2017-10-26 at 11.53.30 am.png2017-10-26T00:54:02.000+0000105255

Comments

  1. Joshua Quick 2018-08-30

    This was a regression that started happening as of Titanium 6.2.0. This issue was resolved in Titanium 6.2.2. See: [TIMOB-25284]

JSON Source