본문 바로가기

Kotlin/자주쓰는 내용 정리

(4)
안드로이드 Logger Util Logger Util 을 만들어서 클래스, 메소드 명만 출력하면서 사용하고 있었는데 MainActivity.java:123 이런 형태로 출력하면 해당 라인으로 바로 이동도 가능하다고 한다. object Logger { private val isDEBUG = BuildConfig.DEBUG fun d(message: String) { if (isDEBUG) { Log.d(tag(), message) } } fun e(message: String) { if (isDEBUG) { Log.e(tag(), message) } } fun i(message: String) { if (isDEBUG) { Log.i(tag(), message) } } fun w(message: String) { if (isDEBUG) ..
Android Studio: CreateProcess error=206, The filename or extension is too long 해결 방법 : Win + R 에서 "resmon" 사용중인 cpu 목록에서 java.exe 프로세스를 종료해주고 다시 빌드하니 동작한다. 파일 이름이 길어서 발생하는 오류인 건 알겠는데 왜 컴퓨터를 재부팅하거나 프로세스를 종료시키면 정상적으로 돌아가는 지 모르겠다. 구글링했을 때 가장 많이 나오던 해결 방법은 말그대로 파일 이름이 길기 때문에 C드라이브/User/AndroidStudioProject ... 이런 식의 경로를 D나 E드라이브로 옮겨주어 파일명을 줄이는 방법이었지만 괜히 git 연동 잘못될까봐 폴더 경로 바꾸기는 시도해보지 않았다. 그래도 컴퓨터 재부팅보다는 나은 방법이라서 다행 ㅠㅠ * clean build나 cache 삭제도 아무 소용없었다. ** 참고로 이 오류 말고도 가끔 해당 디렉토..
나를 위한 Splash 화면 implementation 'com.airbnb.android:lottie:x.x.x' github.com/airbnb/lottie-android airbnb/lottie-android Render After Effects animations natively on Android and iOS, Web, and React Native - airbnb/lottie-android github.com SplashActivity.kt import android.app.Activity import android.content.Intent import android.os.Bundle import android.os.Handler class SplashActivity : Activity(){ val TIME_OUT :..
RecyclerView 클릭이벤트 인터페이스 보호되어 있는 글입니다.