์•ฑ ๐Ÿ’ป 2

์•ˆ๋“œ๋กœ์ด๋“œ ์™ธ๋ถ€ ํด๋ž˜์Šค ๋ฉ”์†Œ๋“œ ์ฐธ์กฐํ•˜๊ธฐ - Kotlin

https://juahnpop.tistory.com/231 ์•ˆ๋“œ๋กœ์ด๋“œ ์ฝ”ํ‹€๋ฆฐ : ์ผ๋ฐ˜ ํด๋ž˜์Šค ๋˜๋Š” Fragment์—์„œ MainActivity์˜ ๋ฉ”์„œ๋“œ ์‚ฌ์šฉํ•˜๊ธฐ Android Kotlin : ์ผ๋ฐ˜ Class์—์„œ MainActivity์˜ ํ”„๋กœํผํ‹ฐ ๋ฐ ๋ฉ”์„œ๋“œ ์‚ฌ์šฉํ•˜๊ธฐ ์ผ๋ฐ˜ Class ์™€ Fragment์—์„œ MainActivity์˜ ๋ฉ”์„œ๋“œ ๋ฐ ํ”„๋กœํผํ‹ฐ ์‚ฌ์šฉ ๋ฐฉ๋ฒ• ์— ๋Œ€ํ•ด ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. Fragment ์—์„œ MainActivity.. juahnpop.tistory.com ์ฐธ์กฐํ•˜๊ณ ์ž ํ•˜๋Š” class ๋‚ด์—์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์„ ์–ธ init{ instance = this } companion object{ private var instance:MyActivity? = null fun getInstance(): MyActi..

[์•ˆ๋“œ๋กœ์ด๋“œ์ŠคํŠœ๋””์˜ค] Unresolved reference: kotlinx ์—๋Ÿฌ

๊ฑฐ์˜ ์ด๋…„๋งŒ์— ์ฝ”ํ‹€๋ฆฐ์œผ๋กœ ์•ฑ ๊ฐœ๋ฐœ ๊ณต๋ถ€๋ฅผ ๋‹ค์‹œ ์‹œ์ž‘ํ–ˆ๋‹ค ์˜ค๋žœ๋งŒ์— ์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค๋ฅผ ํ‚ค๊ณ  ์˜ˆ์ „์— ๊ณต๋ถ€ํ–ˆ๋˜ ์ฝ”๋“œ๋ฅผ ๋‹ค์‹œ ์น˜๋Š”๋ฐ ๊ณ„์† ์˜ค๋ฅ˜๊ฐ€ ๋‚ฌ๋‹ค ์ด๊ฒŒ ๋ฐ”๋กœ ๋ฌธ์ œ์˜ ์ฝ”๋“œ import kotlinx.android.synthetic.main.activity_main.* activity_main.xml์— ์žˆ๋Š” button๊ณผ textview๋“ฑ์˜ id๋ฅผ ์ฐธ์กฐํ•˜๋ ค๋ฉด kotlin-android-extensions ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๋ฐ ํ•ด๋‹น ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ import๊ฐ€ ์•ˆ๋๋‹ค ๊ตฌ๊ธ€๋ง ํ•ด ๋ณธ ๊ฒฐ๊ณผ ์•„๋ฌด๋ž˜๋„ ๋‚ด๊ฐ€ ์“ฐ๊ณ  ์žˆ๋Š” 4.2 ๋ฒ„์ „์—์„œ๋Š” ํ•ด๋‹น ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋ณ„๋„๋กœ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด ์ค˜์•ผํ•œ๋‹ค๊ณ  ํ–ˆ๋‹ค ํ•ด๋‹น ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ํ”„๋กœ์ ํŠธ ์ฐฝ์—์„œ Gradle Scripts/build.gradle(Module)..

๋ฐ˜์‘ํ˜•