Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
조회 수 894 댓글 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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
69 | System/OS | 맥 OS X 에서 스크린 화면 캡쳐 단축키 (Mac Print Screen) | hooni | 2015.07.21 | 2042 |
68 | System/OS | 맥북에서 MAC/윈도우 멀티부팅시 시간 설정 | hooni | 2013.04.23 | 29866 |
67 | System/OS | 맥에서 파일공유 (윈도우,맥) | hooni | 2013.04.25 | 37400 |
66 | System/OS | 맥에서 포트 확인하고 닫기 (mac) | hooni | 2022.03.22 | 1207 |
65 | Etc | 모바일 프로그래머가 갖추어야 할 필수 역량 | hooni | 2017.02.16 | 1495 |
64 | Develop | 모터에 대한 pid 제어.. ㅎㅎ | hooni | 2013.04.23 | 18938 |
63 | System/OS | 무료로 HTTPS 적용하기 (Let's Encrypt) | hooni | 2017.10.28 | 1690 |
62 | System/OS | 무료로 HTTPS 적용하기 (Lets' Encrypt) | hooni | 2017.02.16 | 2385 |
61 | System/OS | 무선 인증 서버.. 김도.. ㅋㅋ | hooni | 2013.04.23 | 17692 |
60 | Develop | 밸런싱 로봇.. 최종.. (관련 논문도 첨부) ㅋㅋ | hooni | 2013.04.23 | 22876 |
59 | Etc | 베지어 곡선 (Bezier curve) | hooni | 2013.08.18 | 222929 |
58 | Develop | 베지어 곡선(Bézier curve) 알고리즘(spline 곡선) 3 | hooni | 2013.04.23 | 33420 |