FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.9.0-runtime (androidx.core:core:1.9.0) and support-compat-27.0.2-runtime (com.android.support:support-compat:27.0.2)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
26 actionable tasks: 12 executed, 14 up-to-date
외부 라이브러리를 build.gradle의 dependencies에서 추가해주고나서 빌드시 해당 에러가 떴다.
✨해결방법은 gradle.properties 파일에서 맨 아래줄에
android.enableJetifier=true
문구를 추가해주면 된다.
참고-Jetifier에 대한 설명
https://stackoverflow.com/questions/51680671/what-is-jetifier
본문 내용중
Jetifier helps in migrating an android project to AndroidX.
Jetifier helps in making 3rd party library compatible with your AndroidX project.