Type com.last.psychat.android.feature.main.BuildConfig is defined multiple times

이지훈·2023년 11월 13일
0

TL;DR

새로 추가한 모듈의 build.gradle 내에 namespace 를 확인하세요

문제 발생

Type com.last.psychat.android.feature.main.BuildConfig is defined multiple times: /Users/yijihun/AndroidStudioProjects/psychat-android/feature/main/build/.transforms/66bea11646d0e871ec0bf5e38a2cf956/transformed/debug/debug_dex/com/last/psychat/android/feature/main/BuildConfig.dex, /Users/yijihun/AndroidStudioProjects/psychat-android/feature/splash/build/.transforms/2759f7f2bce2b8c5f29a6e20c7c9c645/transformed/debug/debug_dex/com/last/psychat/android/feature/main/BuildConfig.dex

개발 하다보면 다음과 같은 에러가 발생하는 것을 확인할 수 있었다.
BuildConfig가 중복으로 정의되었다는 의미인 것 같다.

문제 해결

나의 경우에선 새로 추가한 모듈의 build.gradle.kts 설정을 다른 모듈의 것을 복붙했기 때문에 발생한 에러였다.

namespace 가 해당 모듈의 것으로 선언되어 있기 때문에(위에 예시에서는 feature:main 모듈) BuildConfig 가 중복으로 정의된 것이다.

새로 추가한 모듈의 이름에 맞게 namespace 를 수정해주고 sync now 해주면 해결된다.

profile
실력은 고통의 총합이다. Android Developer

0개의 댓글