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

CLI: error when building if there is only a numeric value in strings.xml

    Details

      Description

      Problem description
      Building the app with Ti Studio 3.0 RC and Ti SDK 3.0 RC produces the following error when there is a numeric only value in strings.xml:

      [ERROR] Unable to run command "build"
       
      TypeError: Object 2355323623 has no method 'replace' 0 [ 'TypeError: Object 2355323623 has no method \'replace\'',
        '    at build.compileI18N.Object.keys.map.add.appname (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/iphone/cli/commands/_build.js:1512:30)',
        '    at Array.map (native)',
        '    at Object.build.compileI18N.Object.keys.map.add.appname (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/iphone/cli/commands/_build.js:1510:64)',
        '    at exports.hitch (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/node-appc/lib/util.js:59:17)',
        '    at async.parallel.results (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:454:21)',
        '    at _asyncMap (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:185:13)',
        '    at async.forEach (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:86:13)',
        '    at Array.forEach (native)',
        '    at _forEach (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:26:24)',
        '    at async.forEach (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:85:9)',
        '---------------------------------------------',
        '    at Object.exports.execFile [as execFile] (child_process.js:594:9)',
        '    at exports.exec (child_process.js:481:18)',
        '    at exports.detect.async.series.cached (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/node-appc/lib/android.js:81:4)',
        '    at async.series.results (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:486:21)',
        '    at _asyncMap (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:185:13)',
        '    at async.forEachSeries.iterate (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:108:13)',
        '    at async.forEachSeries.iterate (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:119:25)',
        '    at _asyncMap (/Users/USR/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121130200208/node_modules/async/lib/async.js:187:17)',
        '---------------------------------------------',
        '    at Object.exports.execFile [as execFile] (child_process.js:594:9)',
      

      Note
      Does not happen in any mobile SDK with Ti Studio 2.1.2. In Ti Studio 3.0, it happens only with mobile SDK 3.0, not with 2.1.4 GA.

      strings.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <resources>
          <string name="welcome_message">2355323623</string>
          <string name="aboutCopyrightPhone">98376349768346</string>
      </resources>
      

      app.js

      var win = Ti.UI.createWindow();
       
      var alert = Titanium.UI.createAlertDialog({
      	title : L('aboutCopyrightPhone'),
      	message : L('welcome_message'),
      	buttonNames : ['Ok'],
      	cancel : 0
      });
      alert.show();
       
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              dsefton Daniel Sefton
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration