Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
Views 899 Comment 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 •
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
141 | Develop | [c] 시어핀스키 가스킷..(p.582, A.2 - 두번째) | hooni | 2003.04.23 | 7535 |
140 | Develop | [c] OpenGL 시어핀스키 가스킷(p.73 - 첫시간) | hooni | 2003.04.23 | 8791 |
139 | Develop | [c] 컴파일러 DFA구현^^ 입력 받아 실행 4 | hooni | 2003.04.23 | 8144 |
138 | Develop | [c] 소켓의 세가지 동작모드 | hooni | 2003.04.23 | 6945 |
137 | Develop | [c] 소켓주소 구조체에 대해.. | hooni | 2003.04.23 | 6764 |
136 | Develop | [c] 소켓 프로그래밍 요약.. | hooni | 2003.04.23 | 6997 |
135 | Develop | [c] fork() 시스템 콜 사용 방법. | hooni | 2003.04.23 | 27647 |
134 | Develop | [c] 가위 바위 보 서버, 클라이언트 소스코드 | hooni | 2003.04.23 | 8220 |
133 | Develop | [html] 메타태그 사용예.. 은지나 바라~ | hooni | 2003.04.23 | 7257 |
132 | Develop | [java] 컴포넌트 배치 ㅡ.,ㅡ; | hooni | 2003.04.23 | 7180 |
131 | Develop | [c] 이진트리(binary tree) 샘플소스 (삽입, 삭제, 운행) | hooni | 2003.04.23 | 7844 |
130 | Develop | [c] 정사각배열의 서브 배열의 최대 값 구하기 | hooni | 2003.04.23 | 7046 |