Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-2601

Android: Adding code that calls Titanium.Platform requires full rebuild

    Details

      Description

      {html}<div><p>Reproduce</p>
      <ul>
      <li>Create a new Titanium project. Don't add any code to it
      yet.</li>
      <li>Launch it.</li>
      <li>After it launches, edit app.js and add
      <code>Ti.API.info("Android version: " +
      Ti.Platform.version);</code>.</li>
      <li>Save app.js and re-launch the application.</li>
      <li>Look at logcat. Instead of setting the <code>info()</code>
      message successfully, you'll see:</li>
      </ul>
      <pre>
      <code>E/KrollContext( 4552): (kroll$1) [11,317] ECMA Error evaluating source: TypeError: Cannot read property "version" from undefined (app://app.js#9)
      E/KrollContext( 4552): org.mozilla.javascript.EcmaError: TypeError: Cannot read property "version" from undefined (app://app.js#9)
      E/KrollContext( 4552): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3761)
      E/KrollContext( 4552): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3739)
      E/KrollContext( 4552): at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3767)
      (etc)</code>
      </pre>
      <ul>
      <li>"touch" the tiapp.xml and relaunch.</li>
      <li>Now you'll see the correct message.</li>
      </ul></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              mculpepper Marshall Culpepper
              Reporter:
              billdawson Bill Dawson
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-2270
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration