본문 바로가기

Kotlin 사용시 주의사항? 열심히 글 작성을 했건만 임시저장에 남지 않고 다 날라가버려서.... 좀 빡쳤지만 다시 써보는 글 원래 이글을 먼저 썼어야 했는데 Kotlin EventBus부터 적었다. 지지난 주말동안 약간의 테스트를 하면서 내린 결론 1. 기존코드를 kotlin으로 수정하기 보다 새로 만들 코드를 kotlin으로2. Android annotation 인식을 못함3.View Binding은 Kotlin Extension plugin을 이용하자 이유 1. Android annotation을 인식못함내가 말한 annotation은 이것 -> https://github.com/androidannotations/androidannotations issue에 보면 EActivity 예제가 하나 있긴한데 ...그 외에는 아무것도.. 더보기
Kotlin 사용 (1) - singleton (Rx EventBus용) Otto나 GreenRobot같은 라이브러리를 이용할 수도 있지만, Rx로도 충분히 구현이 가능하기 때문에(Otto는 Rx가 나오고 중단된 걸로 알고있음) 기존 자바 클래스public class PerformanceEventBus { public static final PerformanceEventBus instance = new PerformanceEventBus(); private BehaviorSubject performanceIdSubject = BehaviorSubject.create(); public PerformanceEventBus(){ } public static PerformanceEventBus getInstance() { return instance; } public void set.. 더보기
Kotlin 설치 아 사실 코틀린에 대해 알고는있었지만, 굳이 꼭 사용해야 할 필요는 있을까가 내 생각이었는데.... 구글에서 이렇게 발표를 해버릴 줄이야-_-;;; 이러다 JetBrains를 인수하는게 아닌지... 아무튼 고런관계로 우선 플러그인부터 설치는 해봄 // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.1.2-3' repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.0' classpath 'com.google.gu.. 더보기