Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24834] Android: Duplicate resource error with multiple app_name definitions

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-08-31T16:00:35.000+0000
Affected Version/sRelease 6.1.1, Release 6.2.0
Fix Version/sRelease 6.1.1, Release 6.2.0
ComponentsHyperloop
Labelsn/a
Reporter Ricardo Ramirez
AssigneeJan Vennemann
Created2017-06-15T17:16:03.000+0000
Updated2017-08-31T16:00:42.000+0000

Description

Issue Description

When compiling an Titanium Hyperloop project for Android, I am getting the following error:
[ERROR] /test/hyperloop-test3/build/android/res/values/values.xml:220: error: Resource entry app_name is already defined.
[ERROR] /test/hyperloop-test3/build/android/res/values/strings.xml:3: Originally defined here.
It seems that Hyperloop is generating a values.xml file for the library: venuekit.aar which defines an app_name property. Is there a way to use the library as Titanium already defines app_name property in strings.xml based on the value from Tiapp.xml?

Steps to reproduce

Download the project https://drive.google.com/file/d/0BwTWo-c2a0b9ellLN3lYbHNuMUU/view?usp=sharing

Run

Comments

  1. Jan Vennemann 2017-06-20

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9162 PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/9163
  2. Abir Mukherjee 2017-06-20

    Passed FR Node Version: 6.10.3 NPM Version: 3.10.10 Mac OS: 10.12.4 Appc CLI: 6.2.2 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.1.1.v20170620083951 Appcelerator Studio, build: 4.9.0.201705302345 Xcode 8.3.2 Hyperloop 2.1.1 Android 7.1 Device I built with SDK 6.1.0 and reproduced the original bug. Then I built with PR/9163 and found that the errors are no longer there, and the app build to device also worked as expected.
  3. Abir Mukherjee 2017-06-20

    Confirmed that changes are seen in these SDK builds: 6.1.1.v20170620103414 6.2.0.v20170620104530
  4. Matt Carney 2017-08-08

  5. Jan Vennemann 2017-08-30

    Thanks for your report [~mcarney], there indeed still was an issue with modules that we didn't catch because the ticket was originally only reported for Hyperloop. [~cwilliams] or [~gmathews], can you take a look at this so maybe we can get this into 6.2.0? Thanks! PR (master): https://github.com/appcelerator/titanium_mobile/pull/9373 PR (6_2_X): https://github.com/appcelerator/titanium_mobile/pull/9374
  6. Hans Knöchel 2017-08-30

    The native project-component of this fix is included in 6.2.0 (release next week, RC this week). Thanks everyone!
  7. Abir Mukherjee 2017-08-30

    Latest PR is causing a regular expression issue, and apps cannot build on Windows-Android. I cannot build to either device or emulator.
       [INFO] :   Alloy compiled in 0.40176s
       [INFO] :   Alloy compiler completed successfully
       [INFO] :   Starting Hyperloop assembly
       [INFO] :   [Hyperloop] Generating system metabase
       [INFO] :   [Hyperloop] Generated AST cache file at C:\Users\Test\AppData\Local\Temp\hyperloop_android-25_metabase.ac5b8e07ce4460b75668b48bbec369655313d172.json.gz in 4.174 seconds
       [INFO] :   Skipping Hyperloop compile, no usage found ...
       [INFO] :   Finished Hyperloop assembly
       [INFO] :   JavaScript files need to be encrypted
       [INFO] :   Processing JavaScript files
       [INFO] :   Encrypting JavaScript files: C:\ProgramData\Titanium\mobilesdk\win32\6.2.0.v20170830125819\android\titanium_prep.win32.exe "com.appc.test2" "C:\Users\Test\Documents\Appcelerator_Studio_Workspace1\test2\build\android\assets" "--file-listing" "C:\Users\Test\Documents\Appcelerator_Studio_Workspace1\test2\build\android\titanium_prep_listing.txt"
       [INFO] :   Writing C:\Users\Test\Documents\Appcelerator_Studio_Workspace1\test2\build\android\bin\assets\app.json
       [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.2.0.v20170830125819\android\modules\titanium-analytics.res.zip
       2017-08-30T23:21:06.020Z | ERROR  | An uncaught exception was thrown!
       Invalid regular expression: /(values(?:-[^\]+)?)\[^\]+$/: Unterminated character class
       2017-08-30T23:21:06.021Z | ERROR  | Invalid regular expression: /(values(?:-[^\]+)?)\[^\]+$/: Unterminated character class
       
    This is the environment: Node Version: 6.10.1 NPM Version: 3.10.10 Windows OS: 10.0.14393 Appc CLI: 6.2.4-master.9 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.2.0.v20170830125819 Appcelerator Studio, build: 4.9.1.201707200100 Android OS 7.1.2 [~lchoudhary] has identified the commit that caused this regression. https://github.com/appcelerator/titanium_mobile/blob/f47d32761193f51fe4bc56f8bb811ee7a466f38c/android/cli/lib/base-builder.js#L76
  8. Jan Vennemann 2017-08-31

    Fixes for the Windows regression with unescaped path separators: PR (master): https://github.com/appcelerator/titanium_mobile/pull/9381 PR (6_2_X): https://github.com/appcelerator/titanium_mobile/pull/9382
  9. Abir Mukherjee 2017-08-31

    Closing ticket. Fix is validated with SDK 6.2.0.v20170831045700; same environment as listed previously.

JSON Source