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

Android Does Not Compile With Space in Localization String

    Details

      Description

      When trying to compile a ally android project, the compiler fail with the following error:

      [ERROR] :  Failed to compile Java source files:
      [ERROR] :  
      [ERROR] :  /Users/mor_eli/Development/Titanium_Workspace/android_alloy/build/android/gen/com/android/alloy/R.java:32: ';' expected
      [ERROR] :          public static final int space test=0x7f040001;
      [ERROR] :                                       ^
      [ERROR] :  /Users/mor_eli/Development/Titanium_Workspace/android_alloy/build/android/gen/com/android/alloy/R.java:32: <identifier> expected
      [ERROR] :          public static final int space test=0x7f040001;
      [ERROR] :                                            ^
      [ERROR] :  2 errors
      [ERROR] Application Installer abnormal process termination. Process exit value was 1
      

      The issue seemed to be linked to having a localization string file in project root/i18n/en/strings.xml

      If the first string line has a space as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <resources>
      	<string name="space test">should not work with space/string>
      </resources>
      

      The compilation fails.
      If the space is removed:

      <?xml version="1.0" encoding="UTF-8"?>
      <resources>
      	<string name="test">should work no space/string>
      </resources>
      

      The compilation works.

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              mor_eli Eli Mor
              Reviewer:
              Allen Yeung
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code