개발/에러해결&팁
안드로이드스튜디오 Error: Execution failed for task ':dexDebug'. / multiDexEnabled
lovely-hoi85
2015. 7. 2. 18:59
안드로이드 스튜디오에서
Error: Execution failed for task ':dexDebug'. 에러가 떴을 때,
Error:Execution failed for task ':dexDebug'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:
Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe''
finished with non-zero exit value 2
원인 >> 프로젝트에서 라이브러리 중복 선언
중복 된부분 삭제하고 해결
-> 프로젝트 파일 합치는 과정에서 예전에 지웠던 파일이 다시 들어가서 오류 발생 ..
-----------------------------------------------------------------------------
+ build.gradle 부분
android {} 안에 아래 항목 추가
defaultConfig {
multiDexEnabled true
}
>> 여러 라이브러리 사용으로 메서드 개수가 65k 가 넘을 때
multiDexEnabled 해결
androidStudio 9.x 이상
gradle 2.1 이상
android Build Took 2.1 이상