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
번호 분류 제목 글쓴이 날짜 조회 수
69 System/OS 맥 OS X 에서 스크린 화면 캡쳐 단축키 (Mac Print Screen) hooni 2015.07.21 1909
68 System/OS 맥북에서 MAC/윈도우 멀티부팅시 시간 설정 file hooni 2013.04.23 29764
67 System/OS 맥에서 파일공유 (윈도우,맥) file hooni 2013.04.25 37305
66 System/OS 맥에서 포트 확인하고 닫기 (mac) hooni 2022.03.22 907
65 Etc 모바일 프로그래머가 갖추어야 할 필수 역량 file hooni 2017.02.16 1306
64 Develop 모터에 대한 pid 제어.. ㅎㅎ file hooni 2013.04.23 18882
63 System/OS 무료로 HTTPS 적용하기 (Let's Encrypt) file hooni 2017.10.28 1409
62 System/OS 무료로 HTTPS 적용하기 (Lets' Encrypt) file hooni 2017.02.16 2196
61 System/OS 무선 인증 서버.. 김도.. ㅋㅋ file hooni 2013.04.23 17597
60 Develop 밸런싱 로봇.. 최종.. (관련 논문도 첨부) ㅋㅋ file hooni 2013.04.23 22824
59 Etc 베지어 곡선 (Bezier curve) file hooni 2013.08.18 221601
58 Develop 베지어 곡선(Bézier curve) 알고리즘(spline 곡선) 3 file hooni 2013.04.23 33281
Board Pagination Prev 1 ... 88 89 90 91 92 93 94 95 96 97 98 Next
/ 98