๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ (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 .. ์ด์ 1 ยทยทยท 40 41 42 43 44 45 46 ยทยทยท 48 ๋ค์