Views 5480 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
# 에러 내용
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
No. Category Subject Author Date Views
795 Develop [ios] APNS에 사용할 인증서 만들기 (KeyChain에 있는 인증서 Export) file hooni 2015.01.03 2141
794 Develop [ios] Xcode의 디버그 모드에서 콜스택 file hooni 2015.01.03 2171
793 Develop [ios] 로컬에 있는 JS 파일 웹뷰에서 동적으로 실행하기 hooni 2015.02.10 2176
792 Develop [js] AngularJS 란? file hooni 2015.11.26 2177
791 Develop [ios] 로컬에 있는 html 실행하기 hooni 2015.02.10 2181
790 Develop [ios] 아이폰 앱 이름 및 버전 정보 hooni 2015.03.24 2194
789 Develop [c#] BHO 한샘툴바랑 동현툴바.. secret hooni 2013.04.23 2208
788 Develop [ios] StoryBoard(xib) 없이 프로젝트 만들기 file hooni 2015.02.12 2228
787 Develop [ios] VIN Scanner (VIN barcode) 스캐너 file hooni 2017.09.16 2262
786 Develop [git] 쉬운 버전관리 Git 설명 hooni 2015.08.18 2263
785 Develop [ios] 비디오,네트워크,소셜로그인 테스트 file hooni 2017.04.04 2271
784 Develop [ios] UIWebView를 이용한 로컬 HTML 파일 표시 file hooni 2015.01.02 2300
783 Develop [ios] UIView 계층구조 hooni 2015.01.03 2316
782 Develop [ios] iOS 앱 아이콘을 만드는 유틸 file hooni 2015.01.03 2317
781 Develop 리팩토링 계획안 file hooni 2017.05.15 2344
780 Develop [ios] Crashlytics, Fabfic 설치/설정 hooni 2016.07.21 2356
Board Pagination Prev 1 2 3 4 5 6 ... 53 Next
/ 53