[AC-969] Image doesn't display unless in res-hdpi folder
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2016-03-09T07:47:53.000+0000 |
Affected Version/s | Appcelerator Studio 4.5.0 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Michael Kellogg |
Assignee | Shak Hossain |
Created | 2016-03-03T14:17:55.000+0000 |
Updated | 2016-03-09T13:45:35.000+0000 |
Description
Steps to Reproduce
header.png should already be in the assets->images and I believe I've referenced the image in the index.xml already Just executeActual Result
no image showsExpected Result
image should show Related SO question: http://stackoverflow.com/questions/35635180/titanium-appcelerator-images-will-not-show-on-android/Attachments
File | Date | Size |
---|---|---|
.log | 2016-03-03T14:17:58.000+0000 | 2673915 |
android_20160309-084428.png | 2016-03-09T07:47:26.000+0000 | 98967 |
diagnostic5981547644041106151.log | 2016-03-03T14:18:05.000+0000 | 58921 |
Log when I executed application:
Hello, "app/assets" folder contains image assets and other files that need to be copied into the Resources directory. Reference these files in the code without the 'app/assets' path and without the platform-specific folder if it is inside one. So in your case the image path should be "/images/header.png". Try that. Thanks.
I was using '/images/header.png' it didn't work. I could try the lib thing.
[~mkellogg91@gmail.com] could you attach a sample project?
I am able to display image using the following code and the following conditions. 1.In a classic mobile app project for android putting the image in "Resources" folder and code "image: 'header.png'," 2.In a classic mobile app project for android putting the image in "Resources/android/images" folder and code " image: '/images/header.png',".
*Environment*: *Device info:* Nexux7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.0 and 5.1.2.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5
[~mkellogg91@gmail.com] Thanks for the project. I could reproduce. However, if I copy over another PNG (e.g. the
appicon.png
one level up) to the same folder that image works fine. So it seems like your PNG is corrupt:!android_20160309-084428.png|thumbnail! This seems to be confirmed by what I get when I move your
header.png
into ares-hdpi
folder. The compile then fails with:I was aware of the failure processing PNG issue. I resolved that by exporting as .png and then re-adding into the project previously. I will try to re-export my png. However, I was able to reproduce the results that you came up with. Thank you sir