Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2626] Android: density images don't get copied to res folder if any JS file has changed and app is rebuilt

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:38.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M01
ComponentsAndroid
Labelsandroid, defect, release-1.6.0, rplist
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:25:11.000+0000
Updated2011-04-17T01:59:38.000+0000

Description

(Bug is on Master, not in the released 1.5.1.) There is something wrong with app build as it pertains to density images getting copied out to res/drawable-mdpi, etc. To reproduce:

  • Create a new Titanium project.
  • Create the folder Resources/android/images/medium in that project.
  • Copy Resources/KS_nav_ui.png to Resources/android/images/medium/test.png
  • Replace app.js with this:
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#fff',
    fullscreen: false,
    exitOnClose: true
});

win.add(Ti.UI.createImageView({image: 'images/test.png', height: 50, width: 50}));
win.open();
  • Launch the app. (Ignore the build warnings about density-specific images.) You should see the image fine when the app loads in the emulator/phone.
  • Edit app.js and just put anything in it,like a new line at the bottom.
  • Launch the app again. You won't see the image.

Comments

  1. Bill Dawson 2011-04-15

    In master, we don't see this message anymore:

       [INFO] Tiapp.xml unchanged, skipping class generation
       

    It's like a whole section of builder.py is being skipped or something

  2. Bill Dawson 2011-04-15

    (from [541c219656d37fe9ab1696c3469205af3c7dc0cf]) [#2626 state:fixed-in-qa] Also copy resource drawables if android.create was called because of js file change https://github.com/appcelerator/titanium_mobile/commit/541c219656d37fe9ab1696c3469205af3c7dc0cf"> https://github.com/appcelerator/titanium_mobile/commit/541c219656d3...

  3. Bill Dawson 2011-04-15

    (from [0ae9bf5d5a25f812f0c46d33c767a85e52e1f5fd]) [#2626 state:fixed-in-qa] Also copy resource drawables if android.create was called because of js file change https://github.com/appcelerator/titanium_mobile/commit/0ae9bf5d5a25f812f0c46d33c767a85e52e1f5fd"> https://github.com/appcelerator/titanium_mobile/commit/0ae9bf5d5a25...

  4. Bill Dawson 2011-04-15

    Though the bug wasn't in the production 1.5.1, it was on the 1_5_X branch, so this commit went there too.

  5. Thomas Huelbert 2011-04-15

    as Bill described, [INFO] Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06) G1 (1.6) and droid1 (2.2.1)

  6. Thomas Huelbert 2011-04-15

    forgot to close

JSON Source