본문 바로가기

kotlin17

코틀린 New Gradle Sync is not supported due to containing Kotlin modules 오류처리 설치한 JVM 버전이 안맞아서 오류가 난다. File.Settigns에 들어가서 버전을 맞춰주면 해결된다. New Gradle Sync is not supported due to containing Kotlin modules 2020. 3. 22.
18. 코틀린 코루틴 안드로이드 전용이 아닌, 코틀린 intellij에서는 라이브러리 추가 메이븐으로 하면 된다고 한다. 참고 사이트 https://kotlinlang.org/docs/tutorials/coroutines/coroutines-basic-jvm.html Your first coroutine with Kotlin - Kotlin Programming Language This tutorial walks us through setting up a project using coroutines, and writing code that uses them. kotlinlang.org https://github.com/Kotlin/kotlinx.coroutines Kotlin/kotlinx.coroutines Library .. 2020. 3. 22.
16. 코틀린 상속 상속할 클래스 : Person 상속받을 클래스 : Student 상속할 예정일 클래스 앞에 open이라는 키워드를 붙여줘야지 상속이 된다. open 키워드를 제거하면 오류. 함수(Person, Print) 앞에 open 키워드를 붙여주면 자식 클래스에서 override 로 재정의 가능하다. 2020. 3. 16.
15. 코틀린 Collection 코틀린 컬렉션 정보. listOf와 setOf는 readonly라 val로 처리했다. 근데 mutable이란 키워드로 생성하면.. 추가 삭제가 된다. ArrayList는 메모리에 배열로 잡히는건지.. 확인해야 하고, setof와 listof는 기존 컬렉션인지 확인해야 한다. 그나마 알기 쉬운건 map이 사전이라는거만 -..- 2020. 3. 16.