Contents

?

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
1077 System/OS 맥에서 포트 확인하고 닫기 (mac) hooni 2022.03.22 893
1076 PPT [ppt] iOS 플라랩#02(2015.03.19) 발표 자료 file hooni 2015.04.24 898
1075 Etc 수리통계학 : 표본공간과 사상-1 hooni 2015.04.20 900
1074 Develop [ios] iOS 8 개발자가 우선 알아야 할 3가지 file hooni 2014.10.02 902
1073 Develop [js] 좋은 강연자료 & UI 자료 hooni 2014.10.06 907
1072 PPT [ppt] Equation Solving 발표 자료 (@AjaxUI랩 밋업데이 2012.02.28) file hooni 2015.07.22 908
1071 System/OS [virtualbox] VirtualBox에 Ubuntu 설치하기 file hooni 2019.11.22 910
1070 PPT 삼성페이(Samsung Pay) 구조 file hooni 2016.09.09 925
1069 Develop [android] 딜레이를 구현하기 위한 꼼수 hooni 2016.11.24 936
1068 System/OS 콘솔에서 패스워드 걸린 zip 압축하는 명령 hooni 2018.03.02 940
1067 Develop [ubuntu] 우분투 18.04에 PHP5 설치하기 hooni 2020.11.14 941
1066 System/OS [펌] 마이크로서비스, 모노리포, SRE, ... 덮어놓고 구글 따라하면 안 되는 기술들 file hooni 2020.10.15 945
Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 ... 98 Next
/ 98