Contents

?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
# 에러 내용
The number of method references in a .dex file cannot exceed 64K
Error: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


# 에러 원인
프로젝트에 사용되는 메소드의 개수가 64K 이상이 되었을때 발생하는 에러이다.
안드로이드 개발자 사이트에서 해결책을 제공하고 있다.
solution https://developer.android.com/studio/build/multidex.html


# 해결 방법

1. build.gradle 아래와 같이 수정하여 빌드 한다.
android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        ...
        minSdkVersion 14
        targetSdkVersion 21
        ...

        // Enabling multidex support.
        multiDexEnabled true
    }
    ...
}

dependencies {
    compile 'com.android.support:multidex:1.0.0'
}

2. Application을 확장하여 사용하는 경우는,
Application을 MultiDexApplication으로 확장하여 아래와 같이 추가 하도록 한다.
public class GlobalApplication extends MultiDexApplication {
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }
}



?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
817 Develop [Xcode] 디버깅 옵션 file hooni 2013.04.23 57200
816 Develop [vb] 비주얼 베이직 205페이지 hooni 2003.04.23 56037
815 Develop [vb] 비쥬얼 베이직 기출 문제 연습 hooni 2003.04.23 55134
814 Develop [vb] 비주얼 베이직 173페이지 hooni 2003.04.23 54803
813 Develop [vb] 비쥬얼 베이직 기출 문제 연습2 hooni 2003.04.23 54338
812 Develop [iphone] view에 대한 조사 ㅡ,.ㅡ; file hooni 2013.04.23 54073
811 Develop [vb] 비쥬얼 베이직으로.. hooni 2003.04.23 53000
810 Develop [android] GCM 사용하기 1 (GCM 서비스 신청하기) file hooni 2013.07.06 51356
809 Develop [android]개발 가이드 및 한글화 문서 file hooni 2013.04.23 47518
808 Develop [android] ArrayAdapter를 이용하여 출력하기 hooni 2013.04.23 47341
807 Develop [ios] UIAlertView 초간단 샘플 ㅎㅎ hooni 2013.10.14 46115
806 Develop [ios] 배열(NSArray) 연산과 간단한 애니메이션(split images) hooni 2013.10.31 45453
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 71 Next
/ 71