[TIMOB-25445] Error loading images from res-ldpi, res-hdpi, ect. folders on Android 7.1.1
GitHub Issue
n/a
Type
Bug
Priority
Critical
Status
Closed
Resolution
Duplicate
Resolution Date
2018-08-30T02:22:32.000+0000
Affected Version/s
n/a
Fix Version/s
n/a
Components
n/a
Labels
n/a
Reporter
ILAY SENER
Assignee
Unknown
Created
2017-10-26T00:54:22.000+0000
Updated
2018-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:
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]