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 관련 메서드들을 바꿔야함.

+ Recent posts