Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2475] Android: Platform - displayCaps.platformHeight is undefined

GitHub Issuen/a
Resolution Date2012-01-23T13:21:30.000+0000
Affected Version/sn/a
Fix Version/sn/a
Labelsmodule_platform, qe-testadded
ReporterIan Hawes
AssigneeNeeraj Gupta


var scrollHeight = Titanium.Platform.displayCaps.platformHeight - 110;

Crashes and gives an "undefined" error.

Update: FIXED


  1. StinkyPickle 2011-04-15

    Mind telling us how you fixed this? I'm having the same problem...

  2. StinkyPickle 2011-04-15

    Oh, I think I've sorted it. I just needed to do a full rebuild by touching the tiapp.xml file.

  3. daniyal 2011-04-15

    I, too, get the same Run-time error which said:

    "Cannot read property from displayCaps from undefined"

    Forcing a full rebuild by editing tiapp.xml file solved the problem as mentioned by StinkyPickle, but this issue needs to be solved perhaps?

  4. Stephen Tramer 2011-04-15

    Assigning to Don for triage.

  5. Goss Nuzzo-Jones (Zipcar) 2011-04-18

    This is occurring quite frequently for me, I'm not sure I understand the workaround.
  6. Paul Dowsett 2012-01-06

    Note the case, ie displayCaps rather than DisplayCaps
  7. Paul Dowsett 2012-01-06

    Correction - on Android both work - on iOS, case matters.
  8. Paul Dowsett 2012-01-19

    As per the user's update in the description, this was fixed. For anyone experiencing this, please verify that you are using displayCaps rather than DisplayCaps.
  9. Natalie Huynh 2012-01-19

    Tested with 1.9.0.v20120117114633 on Droid 3 2.3.4
  10. Wilson Luu 2012-01-23

    Updating tags

JSON Source