Kotlin Android Extensions: Say goodbye to findViewById (KAD 04) > 개발

본문 바로가기

사이트 내 전체검색

뒤로가기 개발

Kotlin Android Extensions: Say goodbye to findViewById (KAD 04)

페이지 정보

작성자 관리자 (112.♡.173.204) 작성일 21-05-04 22:16 조회 3,234 댓글 0

본문

## 추가

kotlin-android-extensions 기능은 지원이 중단될 예정이며,

대신에, View Binding ( 뷰 바인딩 ) 으로 처리해야 한다고 한다.

https://androidhuman.com/2020-11-25-android_view_binding
https://flow9.net/bbs/board.php?bo_table=android&wr_id=27
https://duckssi.tistory.com/42





## kotlin-android-extensions

kotlin 작성시 findViewById 로 찾지 않아도 되게 해 주는 플러그인이다.

그런데,
Android Studio 4.1 에서 kotlin-android-extensions 이 빠져 버렸다고 한다.

그 이유에 대한 영상이다. 오류를 발생시킬수 있다고 한다.
https://www.youtube.com/watch?v=GCbN29rV1Rg


## 추가하는 방법

그래도 사용해야겠다고 한다면, 아래처럼 추가해 주면 된다.

프로젝트 화면 왼쪽창에서 Gradle Scripts > build gradle (Module: ... 에 들어간다.
```
plugins {
    id 'com.android.application'
    id 'kotlin-android'
}
```

```
plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
}
```
처럼 추가해 준다.




## 참고
https://antonioleiva.com/kotlin-android-extensions/
https://www.youtube.com/watch?v=GCbN29rV1Rg
https://www.youtube.com/watch?v=z0ha16-oz7I
https://androidhuman.com/2020-11-25-android_view_binding

추천0

댓글목록 0

등록된 댓글이 없습니다.

전체 386건 4 페이지
게시물 검색
Copyright © Baragi.Net All rights reserved.
PC 버전으로 보기