
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
에뮬레이터 실행은 되는데 앱이 반응이 없어서 껏다 켜니 에러가 났습니다.
멀티덱스 문제라고 나오는데 아래처럼 해결하였습니다.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
* 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.gradle 설정 수정: (파일위치 : android > app > build.gradle)
안드로이드 앱의 build.gradle 파일에 다음과 같이 multiDexEnabled 및 implementation 'com.android.support:multidex:2.0.1'를 추가합니다.
android {
...
defaultConfig {
...
multiDexEnabled true
}
}
dependencies {
implementation 'com.android.support:multidex:2.0.1'
}
동일한 에러 나시는 분들 참고 하시면 좋겠습니다.
