NativeScript / NativeScript/nativescript-cli
Adding strings.xml in App_Resources/Android/src/main/res/values is crashing the build
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 204
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 8
説明
By the design with CLI 4.1.0 the structure of Android resource folder is as follows:
Android/src/main/res/values
By default in values folder there is colors.xml and styles.xml files.
When, I add a strings/xml file it will cause the app build to crash.
The reaons: the strings.xml is created during build and if a custom file is introduced it will replace the content of the default one causing two string to be missing (whic are used in AndoridManifes)
Error log
D:\git\NS-Issues-2018-II\NativeScript\issue-5897\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:33: AAPT: error: resource string/app_name (aka org.nativescript.issue5897:string/app_name) not found.
D:\git\NS-Issues-2018-II\NativeScript\issue-5897\platforms\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:44: AAPT: error: resource string/title_activity_kimera (aka org.nativescript.issue5897:string/title_activity_kimera) not found.
Reproducible with hello world template and CLI 4.1.0 on Win.
Steps to reporduce:
- Create new project
- Add strings.xml in Android/src/main/res/values
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="nativescript_google_maps_api_key">Some-Api-Key</string>
</resources>
- Build the project - it fails due to missing
title_activity_kimeraandapp_name
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
CLI 4.1.0 とカスタムの App_Resources/Android/src/main/res/values/strings.xml を使用する hello-world プロジェクトで失敗を再現します。ビルド中に Android リソースがどのように組み立てられるかを調査し、生成された app_name と title_activity_kimera の文字列がカスタム文字列とともに引き続き利用可能であることを確認します。カスタムリソースファイルを使用してプロジェクトが正常にビルドできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, javascript
- 領域
- build-system, cli, mobile-dev
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100