
이것도 수많은 삽질중에 하나였지만 돌이켜보면 재밌는 삽질이였던거 같다ㅋㅋㅋㅋ
뭐든 에러 메시지가 알려주니 점점 만드신 개발자분들한테 존경이 생긴다.
Found multiple occurrences of org.json.JSONObject on the class path:
jar:file:/home/suby/.gradle/caches/modules-2/files-2.1/org.json/json/20231013/e22e0c040fe16f04ffdb85d851d77b07fc05ea52/json-20231013.jar!/org/json/JSONObject.class
jar:file:/home/suby/.gradle/caches/modules-2/files-2.1/com.vaadin.external.google/android-json/0.0.20131108.vaadin1/fa26d351fe62a6a17f5cda1287c1c6110dec413f/android-json-0.0.20131108.vaadin1.jar!/org/json/JSONObject.class
You may wish to exclude one of them to ensure predictable runtime behavior
메시지를 해석해보면 org.json.JSONObject 클래스가 중복이 되서 오류를 야기할 수 있다고 한다.
다행히 gradle 의존성에서 android-json을 제외해주면 해결되는 문제이니 빠르게 알아보자.
testImplementation("org.springframework.boot:spring-boot-starter-test"){
exclude group: "com.vaadin.external.google", module:"android-json"
}
예외가 필요한 그룹은 exclude group을 통해 명칭을 지정해주면 원하는 라이브러리를 조회할 수 있을 것이다.