The given artifact contains a string literal with a package reference 'Android.support.v4.content' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.
환경 : Butterknife 사용
오류 원인 : Butterknife 가 최신 버전이 아니라서 andoidx 를 지원해주지 않음.
해결방안 :
Build(.app) 에 다음과 같이 Butterknife 를 최신 버전으로 업그레이드.
dependencies {
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
}
+) 최신 Android Studio 에서는 complie 대신에 implementation을 사용하라는 에러가 발생하기 시작함
+) 기존의 Butterknife 를 사용한 블로거들의 포스팅 날짜를 잘 살펴봐야함!! 그들의 포스팅이 도움은 되나, 2020 최신 포스팅이 아니기 때문에 Butterknife 버전도 다르고, Butterknife의 버전을 높였을 때의 사용하는 메서드도 달라짐ㅜ 결국 Butterknife를 버전 업그레이드 했다면, 기존에 썻던 Butterknife 관련 메서드들을 바꿔야함.
'프로그래밍 > Android' 카테고리의 다른 글
Android Programming : Android O 버전 이상의 백그라운드 실행, Foreground service / 죽지않는 앱 (0) | 2020.05.15 |
---|---|
Android Programming : Broadcast Receiver - get Incoming phone number, 전화번호 받기 (1) | 2020.05.14 |
Android Programming : java.lang.IllegalArgumentException: view must not be null (0) | 2020.05.13 |
Android Programming : 로그 찍기 (0) | 2020.05.07 |
Android Programming : Custom Dialog 생성하기 (0) | 2020.04.28 |