본문 바로가기

안드로이드/안드로이드 디버깅

[디버깅] ClassNotFoundException: Dex file '/data/app,...'

앱 실행 시 메인 액티비티에 대해 ClassNotFoundException이 발생하는 오류이다. Manifest의 액티비티명, 패지키명도 제대로 작성되어 있고 해당 오류가 발생한다면, 앱 단위의 build:gradle에 다음 컴파일 옵션을 추가해준다.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}