[TIMOB-28027] Android: Build fails as duplicate string with "app_name" in i18n strings.xml file
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-11-23T22:08:16.000+0000 |
Affected Version/s | Release 9.0.0 |
Fix Version/s | Release 9.3.0 |
Components | Android |
Labels | android, i18n, localization, regression |
Reporter | Lokesh Choudhary |
Assignee | Joshua Quick |
Created | 2020-07-16T23:43:44.000+0000 |
Updated | 2020-11-23T22:08:16.000+0000 |
Description
Note: This is an undocumented way of doing it. But,we need to put in a check for this.
Steps to reproduce:
1. Create an app. 2. Create a folder & a string.xml file for each locale as./i18n/en/strings.xml
& ./i18n/es/strings.xml
3. In strings.xml in en folder add:
<resources>
<string name="app_name">Cat</string>
</resources>
4. In strings.xml in es folder add:
<resources>
<string name="app_name">Catana</string>
</resources>
5. In the tiapp.xml add this in the android section:
<manifest android:versionCode="1" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="@string/app_name"/>
</manifest>
6. Build for android device/emulator.
Actual result:
The build fails with :
[ERROR] : [GRADLE]
[ERROR] : [GRADLE] FAILURE: Build failed with an exception.
[ERROR] : [GRADLE]
[ERROR] : [GRADLE] * What went wrong:
[ERROR] : [GRADLE] Execution failed for task ':app:mergeDebugResources'.
[ERROR] : [GRADLE] > /Users/lchoudhary/Desktop/workspaces/workspace_2020/AppName_i18n/build/android/app/src/main/res/values/ti_i18n_strings.xml: Error: Found item String/app_name more than one time
[ERROR] : [GRADLE]
[ERROR] : [GRADLE] * Try:
[ERROR] : [GRADLE] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[ERROR] : [GRADLE]
[ERROR] : [GRADLE] * Get more help at https://help.gradle.org
[ERROR] : [GRADLE]
[ERROR] : [GRADLE] BUILD FAILED in 770ms
PR (master): https://github.com/appcelerator/titanium_mobile/pull/11841
FR Passed Waiting for Jenkins build
Verified on: Mac OS: 10.15.4 SDK: 9.3.0.v20201123121926 Appc CLI: 8.1.1 JDK: 11.0.6 Node: 12.16.1 Studio: 6.0.0.202005141803 Device: Pixel 3 XL(v11.0) emulator