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

๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

(377)
[Kotlin Coroutine] Flow - 1 kotlinlang.org/docs/flow.html#sequences Asynchronous Flow - Help | Kotlin kotlinlang.org Asynchronous Flow suspending ํ•จ์ˆ˜๋Š” ๋น„๋™๊ธฐ์ ์œผ๋กœ ํ•˜๋‚˜์˜ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ๋น„๋™๊ธฐ์ ์œผ๋กœ ๊ณ„์‚ฐ๋œ ์—ฌ๋Ÿฌ ๊ฐ’๋“ค์„ ์–ด๋–ป๊ฒŒ ๋ฐ˜ํ™˜ํ•  ์ˆ˜ ์žˆ์„๊นŒ์š”? Kotlin Flows๋Š” ์—ฌ๊ธฐ์„œ ๋“ฑ์žฅํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ ๊ฐ’๋“ค์„ ํ‘œ์‹œํ•˜๊ธฐ ์—ฌ๋Ÿฌ ๊ฐ’๋“ค์€ Kotlin์—์„œ collection์„ ์ด์šฉํ•ด์„œ ํ‘œํ˜„๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด์„œ, simple() ํ•จ์ˆ˜๋Š” ์„ธ ๊ฐœ์˜ ์ˆซ์ž๋“ค์˜ List๋ฅผ ๋ฐ˜ํ™˜ํ•˜๊ณ  forEach๋ฅผ ์ด์šฉํ•ด์„œ ๋ชจ๋“  ์ˆซ์ž๋“ค์„ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค. fun simple(): List = listOf(1, 2, 3) fun main() { simple().forEach {..
[Kotlin Coroutines] Job kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/index.html Job - kotlinx-coroutines-core Job A background job. Conceptually, a job is a cancellable thing with a life-cycle that culminates in its completion. Jobs can be arranged into parent-child hierarchies where cancellation of a parent leads to immediate cancellation of all its children recu kotlin.github.io..
[Android] could not find Fragment constructor ์ด ๋กœ๊ทธ๊ฐ€ ๋ฌด์Šจ ์˜๋ฏธ์ธ์ง€ ๋ชฐ๋ผ์„œ ํ•œ์ฐธ ํ—ค๋งธ๋‹ค. Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{๋ฉ”์ธ์•กํ‹ฐ๋น„ํ‹ฐ}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment ์ปค์Šคํ…€๋‹ค์ด์–ผ๋กœ๊ทธํ”„๋ž˜๊ทธ๋จผํŠธ: could not find Fragment constructor ... Caused by java.lang.NoSuchMethodException: ์ปค์Šคํ…€๋‹ค์ด์–ผ๋กœ๊ทธํ”„๋ž˜๊ทธ๋จผํŠธ. [] https://developer.android.com/reference/android/app/Fragment.html#Fragment() ..
[Android] Using WebView from more than one process at once with the same data directory is not supported. / AwDataDirLock.java / org.chromium.android_webview.AwDataDirLock.b Crashlytics ๋กœ๊ทธ๋ฅผ ํ™•์ธํ–ˆ๋‹ค. AwDataDirLock.java / org.chromium.android_webview.AwDataDirLock.b Using WebView from more than one process at once with the same data directory is not supported. Android 9(API level 28) ์ด์ƒ ํƒ€๊ฒŸํŒ…ํ•˜๋Š” ์•ฑ์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ์— ๋Œ€์‘ํ•˜์ง€ ๋ชปํ•œ ๊ฒƒ์ด์—ˆ๋‹ค. https://developer.android.com/about/versions/pie/android-9.0-changes-28?hl=ko#framework-security-changes ๋™์ž‘ ๋ณ€๊ฒฝ์‚ฌํ•ญ: API ๋ ˆ๋ฒจ 28+๋ฅผ ํƒ€๊ฒŸํŒ…ํ•˜๋Š” ์•ฑ | Android ๊ฐœ๋ฐœ์ž | Android ..
[Android/Crashlytics] libc.so / unknown ์ด์Šˆ - native crash Firebase Crashlytics๋ฅผ ํ™•์ธํ•˜๋Š”๋ฐ ๋„ํ†ต ์•Œ ์ˆ˜ ์—†๋Š” ์ด์Šˆ๊ฐ€ ์žˆ์—ˆ๋‹ค. ๊ตฌ๊ธ€์— ๋ฌผ์–ด๋ฌผ์–ด ํžŒํŠธ๋ฅผ ์–ป์—ˆ๋‹ค. stackoverflow.com/a/45785936/9287140 Unknown crash report android I have released an app on Google play store and started rolling out updates, the latest one seemed to worked fine until I received this crash report from a user can anyone help me figure out what i... stackoverflow.com That's a native crash meaning a bug that was in ..
[Kotlin] Companion Object์˜ ํ™œ์šฉ medium.com/google-developer-experts/companion-objects-kotlins-most-unassuming-power-feature-fb5c0451fbd0 Companion Objects: Kotlin’s most unassuming power feature In which I argue the case for Kotlin’s Companion Objects being the Clark Kent of language features, in being deceptively powerful, and how… medium.com Companion Object๊ฐ€ ๋‹จ์ˆœํžˆ ํด๋ž˜์Šค์˜ ์ •์  ๋ฉค๋ฒ„ ์ƒ์„ฑํ•˜๋Š” ๊ฒƒ ์ด์ƒ์˜ ํ™œ์šฉ ๋ฐฉ๋ฒ•์ด ์žˆ์Œ์„ ์•Œ๋ ค์คŒ. -> Companion Oject ์ •๋ฆฌ **..
[Kotlin] Functional (SAM) interface kotlinlang.org/docs/fun-interfaces.html#sam-conversions Functional (SAM) interfaces | Kotlin kotlinlang.org ์ถ”์ƒ ํ•จ์ˆ˜ ํ•˜๋‚˜๋งŒ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ functional interface, ๋˜๋Š” Single Abstract Method (SAM) interface๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. ์ด ์ธํ„ฐํŽ˜์ด์Šค๋Š” ์—ฌ๋Ÿฌ non-abstarct ๋ฉค๋ฒ„๋“ค์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์œผ๋‚˜, ์ถ”์ƒ ํ•จ์ˆ˜๋Š” ํ•˜๋‚˜๋งŒ ๊ฐ€์ง„๋‹ค. fun ์ˆ˜์ •์ž๋ฅผ ์ด์šฉํ•ด์„œ ํ‘œ์‹œํ•œ๋‹ค. > fun interface fun interface KRunnable { fun invoke() } SAM conversions SAM coversions๋ฅผ ์ด์šฉํ•˜๋ฉด ๋žŒ๋‹ค ํ‘œํ˜„์‹์„ ์ด์šฉํ•ด์„œ ์ฝ”๋“œ๋ฅผ ๋” ๊ฐ„๊ฒฐํ•˜๊ณ  ์ผ..
[Kotlin] Companion objects kotlinlang.org/docs/object-declarations.html#companion-objects Object expressions and declarations | Kotlin kotlinlang.org ํด๋ž˜์Šค ์•ˆ์˜ ์˜ค๋ธŒ์ ํŠธ ์„ ์–ธ์€ companion ํ‚ค์›Œ๋“œ๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. class MyClass { companion object Factory { fun create(): MyClass = MyClass() } } companion object์˜ ๋ฉค๋ฒ„๋“ค์€ ๋‹จ์ˆœํ•˜๊ฒŒ ํด๋ž˜์Šค ์ด๋ฆ„์„ ํ•œ์ •์ž๋กœ ์‚ฌ์šฉํ•ด์„œ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. val instance = MyClass.create() companion object์˜ ์ด๋ฆ„์€ ์ƒ๋žต ๊ฐ€๋Šฅํ•œ๋ฐ, ์ด ๊ฒฝ์šฐ Companion ์ด๋ž€ ์ด๋ฆ„์ด ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. class ..