Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
조회 수 746 댓글 0
# 에러 내용
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); } }
TAG •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1089 | System/OS | [linux] 텔넷, FTP 텍스트 모드에서 사용 | hooni | 2003.04.23 | 11939 |
1088 | System/OS | [linux] 이기종간의 파일 공유(Samba) | hooni | 2003.04.23 | 14900 |
1087 | System/OS | [linux] sendmail 설정/사용 | hooni | 2003.04.23 | 14570 |
1086 | System/OS | [linux] DNS(Domain Name System) 설치, 설정 | hooni | 2003.04.23 | 12438 |
1085 | System/OS | [linux] Masquerade 가상 ip분할기법 | hooni | 2003.04.23 | 47936 |
1084 | System/OS | [linux] DHCP(Dynamic Host Configuration Protocol) 서버 | hooni | 2003.04.23 | 13023 |
1083 | System/OS | [linux] 네트웍 트래픽 모니터링(MRTG) | hooni | 2003.04.23 | 41647 |
1082 | System/OS | [linux] 커널 컴파일, 설정 | hooni | 2003.04.23 | 17845 |
1081 | System/OS | [linux] 네트워크 커널 설정.. | hooni | 2003.04.23 | 16468 |
1080 | System/OS | [linux] 최소한의 커널 설정(커널설치 전체과정) | hooni | 2003.04.23 | 17383 |
1079 | System/OS | [linux] Xwindow/Xmanager 사용 | hooni | 2003.04.23 | 13326 |
1078 | System/OS | [linux] ipchains 옵션 | hooni | 2003.04.23 | 13605 |