- 110

[Kotlin] 코루틴 coroutine

Reference: wooooooak.github.io/kotlin/2019/08/25/%EC%BD%94%ED%8B%80%EB%A6%B0-%EC%BD%94%EB%A3%A8%ED%8B%B4-%EA%B0%9C%EB%85%90-%EC%9D%B5%ED%9E%88%EA%B8%B0/ 코틀린 코루틴(coroutine) 개념 익히기 · 쾌락코딩 코틀린 코루틴(coroutine) 개념 익히기 25 Aug 2019 | coroutine study 앞서 코루틴을 이해하기 위한 두 번의 발악이 있었지만, 이번에는 더 원론적인 코루틴에 대해서 알아보려 한다. 코루틴의 개념이 정확 wooooooak.github.io 정리를 너무 잘해놓으셔서 코루틴 찾다가 행복사했다 정리해주신 내용들 중에 이게 메인

Web | App/Android 2021.01.06

[Kotlin] 갑자기 Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: 어쩌구,,

Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 갑자기 이런 오류가 떴는데 로그를 보니까 setContentView(R.layout.activity_main) 여기가 문제란다,, 아니 지난주까지 잘됐잖아,,,, 왜이래,,,,, 이제 com.android.support 의 지원이 없어지고 androidx로 간다고 하는데 이거 때문에 그런건가? 아무튼 AppCompat 에서 나는 문제는 맞다 그래서 이 부분을 수정해줘야하는데 확인한 방법은 두 가지다 1. Depend..

Web | App/Android 2020.12.14

[Kotlin] Retrofit2 + OkHttp로 API request 시작기

- Retrofit square.github.io/retrofit/ Retrofit A type-safe HTTP client for Android and Java square.github.io 안드로이드에서 사용가능한 REST Client (서버 통신을 위한 라이브러리) Retrofit은 HTTP요청에 OkHttp 라이브러리를 사용함 처음에 Asynctask를 알려주셨었는데 Asynctask는 어렵고 시간도 많이 들고 해서 안드로이드에서 deprecated 되었다고 한다 1. build.gradle(Module:) > dependencies에 Retrofit, OkHttp 추가 // Retrofit: 서버와 통신 implementation 'com.squareup.retrofit2:retrofit:2...

Web | App/Android 2020.12.06

[Kotlin] findViewById 대신 id 값이었지만 이제는 view binding

코틀린으로 개발하면서 가장 많이 봤던 글이 findViewByID를 안쓰고 그냥 id 값만으로도 사용할 수 있다! 였다 val imageView = itemView.findViewById(R.id.image_view) imageView.setImageResource(R.mipmap.ic_launcher) 이렇게 불러와서 사용했던 걸 image_view.setImageResource(R.mipmap.ic_launcher) 이렇게 바로 사용할 수 있다고 그런데 안드로이드 스튜디오 4.1 들어서면서 이 기능을 제공해줬던 plugins { id 'kotlin-android-extensions' } 이 kotilin-android-extensions을 기본으로 제공하지 않고 앞으로는 지원하지 않을 거라고 한다 이..

Web | App/Android 2020.12.05

[Kotlin] data class 여러 개 코드 컨벤션

먼가 개발을 하는데 한 파일에 클래스를 여러개 만드니까 얘만 아이콘이 이렇게 파일 형태로 바뀌고,, 확장자도 보이고,, 그래서 코틀린 코드 컨벤션을 찾아봤다 kotlinlang.org/docs/reference/coding-conventions.html#source-file-organization Coding Conventions - Kotlin Programming Language kotlinlang.org Placing multiple declarations (classes, top-level functions or properties) in the same Kotlin source file is encouraged as long as these declarations are closely relat..

Web | App/Android 2020.12.05

Python IP주소로 위도, 경도 위치 찾기 (latitude, longitude)

- IP주소 검색해보기 aws cloudfront를 사용하는데 어떤 주소는 aws 본사 위치가 나오고 어떤 건 aws edge server 위치를 알려주고,, 이거 뭐,, https://www.whtop.com/tools.ip IPv4 & IPv6 location: find Country, Region, City, ISP & more Free IPv6 and IPv4 location & address locator. Find Country, Region & City based on IP, Zip Code, ISP (name/url), Latitude & Longitude. Updated Dec 2020 www.whtop.com ip주소 검색 해보는 건 그래서 여기서 검색하는 걸로 바꿨다 - Python ..

Programming/Python 2020.12.04