๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๋นˆ ๊ตฌ๋ฉ ์ฑ„์šฐ๊ธฐ

[Android] ํ”„๋กœ์ ํŠธ์— ๊ฐœ๋ฐœ์ž๊ฐ€ ์ž‘์„ฑํ•˜์ง€ ์•Š์€ ๋ฆฌ์†Œ์Šค๊ฐ€ ๋…ธ์ถœ๋œ๋‹ค?!(ํ”„๋กœ์ ํŠธ์™€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ resource conflict. ๋ฆฌ์†Œ์Šค ์ด๋ฆ„์ด ๊ฐ™์„ ๊ฒฝ์šฐ)

๊ฒฐ๋ก  - ๋‘๊ด„์‹ ์ง„ํ–‰๐Ÿ˜‰

 

๋ฉ”์ธ ํ”„๋กœ์ ํŠธ์˜ ๋ฆฌ์†Œ์Šค ์ด๋ฆ„๊ณผ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๋ฆฌ์†Œ์Šค ์ด๋ฆ„์ด ์ถฉ๋Œ๋‚  ๊ฒฝ์šฐ(๊ฐ™์„ ๊ฒฝ์šฐ), ์ตœ์ข… ๋นŒ๋“œ๋Š” ์–ด๋–ค ๊ฑธ ์„ ํƒํ•  ์ง€ ๋ชจ๋ฅธ๋‹ค. ๊ทธ๋ž˜์„œ ๋‚ด๊ฐ€ ์ง€์ •ํ•œ ๋ฆฌ์†Œ์Šค ๋Œ€์‹  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์—์„œ ์ง€์ •ํ•œ ๋ฆฌ์†Œ์Šค๊ฐ€ ๋…ธ์ถœ๋  ์ˆ˜ ์žˆ๋‹ค.

 

์Šคํƒ ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ ์„ ๋ฐฐ๋‹˜ ๋„์›€ : https://stackoverflow.com/a/16351022/9287140

 

Why Android cannot deal with Resources name conflict between Project and Library?

I have a project A that referenced by Library B, A and B have the same name and type, but their value are different. I think aapt should deal with this issue that make sure project and library acce...

stackoverflow.com

 

๋„ต ์ œ๊ฐ€ ์ด๋ฆ„ ๋ฐ”๊พธ๊ฒ ์Šต๋‹ˆ๋‹ค.

 


์ด์Šˆ๋ฅผ ์ฐพ๊ณ  ์ถ”์ ํ•œ ์Šคํ† ๋ฆฌ ๊ธฐ๋ก.

(์ด๊ฑธ ์ฐพ์•„๋‚ธ ๋‚ด๊ฐ€ ๋Œ€๊ฒฌํ•˜๋‹ค.)

 

์ด์Šˆ๊ฐ€ ๋“ฑ์žฅํ–ˆ๋‹ค.

์ง„ํ–‰

์›๋ž˜ ๋…ธ์ถœ๋˜์–ด์•ผ ํ•˜๋Š” ๋ฌธ์ž์—ด์€ "์ง„ํ–‰"์ด๋‹ค.

๊ทธ๋Ÿฐ๋ฐ ๋‚ด๊ฐ€ ์“ด ์ ์ด ์—†๋Š” ๋ฌธ์ž์—ด("์ง„ํ–‰ ์ƒํ™ฉ:")์ด ๋“ฑ์žฅํ–ˆ๋‹ค.

์ง„ํ–‰ ์ƒํ™ฉ:

์ฝ”๋“œ์˜ ๋ฆฌ์†Œ์Šค๋ฅผ ์‚ดํŽด๋ณด์•˜๋‹ค.

 

์ถ”๊ฐ€ํ•œ ์  ์—†๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๋ฆฌ์†Œ์Šค์— ์ฐธ์กฐ๋˜๋‹ค๋‹ˆ!

navigation-dynamic-features-fragment-2.3.4.arr์€ ๋ฌด์—‡์ธ์ง€ ์•Œ ์ˆ˜๊ฐ€ ์—†์—ˆ๋‹ค.

 

์ด์   ๋ฌด์—‡์„ ํ•ด์•ผํ•˜๋Š”๊ฐ€

1) navigation-dynamic-features-fragment ๋ผ์ด๋ธŒ๋Ÿฌ์ด์— ์ง„์งœ R.string.progress ๋ผ๋Š” ํ•œ๊ตญ์–ด ๋ฆฌ์†Œ์Šค๊ฐ€ "์ง„ํ–‰ ์ƒํ™ฉ:" ์ธ์ง€ ํ™•์ธํ•˜๊ธฐ

2) navigation-dynamic-features-fragment-2.3.4์˜ ํ”์ ์„ ํ”„๋กœ์ ํŠธ ์•ˆ์—์„œ ์ฐพ์•„๋ณด๊ธฐ. ์ €๋Ÿฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋‚˜๋‚˜ ๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž๋ถ„๋“ค์ด ์ถ”๊ฐ€ํ•œ ์ ์ด ์—†๋‹ค๋ฉด, ๋‹ค๋ฅธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ์ฐธ์กฐ๋œ ๋…€์„์ด๊ฒ ๋‹ค.

 

 

1) navigation-dynamic-features-fragment ๋ผ์ด๋ธŒ๋Ÿฌ์ด์— ์ง„์งœ R.string.progress ๋ผ๋Š” ํ•œ๊ตญ์–ด ๋ฆฌ์†Œ์Šค๊ฐ€ "์ง„ํ–‰ ์ƒํ™ฉ:" ์ธ์ง€ ํ™•์ธํ•˜๊ธฐ

 

์ฐพ์•˜๋‹ค. ์ฐพ์•˜์–ด!

navigation-dynamic-features-fragment ์•ˆ์— ์ •๋ง progress ๋ผ๋Š” ์ด๋ฆ„์˜ "์ง„ํ–‰ ์ƒํ™ฉ:" ๋ฌธ์ž์—ด ๋ฆฌ์†Œ์Šค๊ฐ€ ์žˆ์—ˆ๋‹ค. 

https://android.googlesource.com/platform/frameworks/support/+/androidx-main/navigation/navigation-dynamic-features-fragment/src/main/res/values-ko/strings.xml 

 

navigation/navigation-dynamic-features-fragment/src/main/res/values-ko/strings.xml - platform/frameworks/support - Git at Google

Copyright 2019 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2

android.googlesource.com

 

2) navigation-dynamic-features-fragment-2.3.4์˜ ํ”์ ์„ ํ”„๋กœ์ ํŠธ ์•ˆ์—์„œ ์ฐพ์•„๋ณด๊ธฐ. ์ €๋Ÿฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋‚˜๋‚˜ ๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž๋ถ„๋“ค์ด ์ถ”๊ฐ€ํ•œ ์ ์ด ์—†๋‹ค๋ฉด, ๋‹ค๋ฅธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ์ฐธ์กฐ๋œ ๋…€์„์ด๊ฒ ๋‹ค.

 

navigation ๊ด€๋ จํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ผ๊ณ ๋Š” ์ด ๋‘ ์นœ๊ตฌ๋ฟ...

navigation ๊ด€๋ จํ•ด์„œ ์ฐธ์กฐ๋œ ๋…€์„๋“ค. ์‹ฌ์ง€์–ด 2.3.5 ๋ฒ„์ „์ด๋‹ค.

๊ฒŒ๋‹ค๊ฐ€ 2.3.5 ๋ฒ„์ „์ด๋ผ๋‹ˆ. 

 

์ •๋ง ์ƒˆ๋กœ ์ถ”๊ฐ€ํ•œ ๋‹ค๋ฅธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ navigation-dynamic-features-fragment์— ๊ด€ํ•ด dependency๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๊ฒƒ์ด๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์–ด๋–ค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ธ์ง€ ๋ชจ๋ฅด๊ฒ ๋‹ค...

 

๊ตฌ๊ธ€๋งํ•˜๋‹ค๊ฐ€ ์–ป์–ด๊ฑธ๋ ธ๋‹ค.

 

๊ฐ„์ ˆํ•จ์œผ๋กœ ์“ด "where". ๊ทธ๋ฆฌ๊ณ  ์ต์ˆ™ํ•œ ์•„์ด๋ฅผ ์ฐพ์•˜๋‹ค.

์ตœ๊ทผ์— ์ถ”๊ฐ€ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์ƒ๊ฐ๋‚ฌ๋‹ค! ์ฐพ์•˜๋‹ค!

 

์ตœ๊ทผ์— ์ถ”๊ฐ€๋œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์นœ๊ตฌ๋“ค

 

๊ทธ๋Ÿผ ์ง„์งœ amplifyframework๊ฐ€ navigation-dynamic-features-fragment๋ฅผ dependency ํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋ฉด ๋œ๋‹ค.

 

https://github.com/aws-amplify/amplify-android/blob/main/build.gradle

 

GitHub - aws-amplify/amplify-android: The fastest and easiest way to use AWS from your Android app.

The fastest and easiest way to use AWS from your Android app. - GitHub - aws-amplify/amplify-android: The fastest and easiest way to use AWS from your Android app.

github.com

 

๋ฒ„์ „์ด 2.3.4 ์ธ navigation-dynamic-features-fragment๊ฐ€ ์—ฌ๊ธฐ ์žˆ์—ˆ๋‹ค.

 

์—ฌ๊ธฐ ์žˆ์—ˆ๋‹ค. 

 

๊ทธ๋Ÿผ ์ด์ œ ๋‚จ์€ ๊ฒƒ์€ ์™œ?! ๋ผ๋Š” ์งˆ๋ฌธ๋ฟ์ด๋‹ค. ์ด ๋‹ต์€ ๋งจ ์œ„์— ๊ฒŒ์‹œํ•œ ๋งํฌ์—์„œ ์ฐพ์•˜๋‹ค. ์ผ๋‹จ ์ € ๋Œ€๋‹ต์œผ๋กœ ๋งŒ์กฑํ•˜๊ธฐ๋กœ ํ–ˆ๋‹ค.

 

resource conflict. 

 

๋ฆฌ์†Œ์Šค ์ด๋ฆ„์„ ๋„ˆ๋ฌด ๊ฐ„๋‹จํ•˜๊ฒŒ ์ง€์–ด๋„ ์•ˆ๋˜๋Š”๊ตฌ๋‚˜ ๋ฅผ ๊ฒฝํ—˜์œผ๋กœ ์–ป์—ˆ๋‹ค. ์•ž์œผ๋กœ๋Š” ์ ‘๋‘์‚ฌ๋‚˜ ์ ‘๋ฏธ์‚ฌ๋ฅผ ๋„ฃ๊ธฐ๋กœ ํ•˜๊ฒ ๋‹ค. 

"์ง„ํ–‰" ๋ฌธ์ž์—ด ๋ฆฌ์†Œ์Šค์˜ ์ด๋ฆ„์„ ๋ณ€๊ฒฝํ•˜๋ฉด์„œ ์ด์Šˆ์— ๋Œ€์‘ํ•œ๋‹ค.

 

์ด๋ ‡๊ฒŒ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋’คํ†ต์ˆ˜ ๋งž์„ ์ˆ˜ ์žˆ๋‹ค.

 

๐Ÿ“š๐Ÿ‘Š๐Ÿ’ฅ๐Ÿคฆ‍โ™€๏ธ๐Ÿคฆ‍โ™‚๏ธ