Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
조회 수 866 댓글 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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
229 | Develop | [css] z-index에 설정할 수 있는 최대값? | hooni | 2013.12.20 | 14749 |
228 | Develop | [js] jQuery plugin 요약 | hooni | 2013.12.20 | 10736 |
227 | Develop | [php] GregorianToJD(), JDToGregorian() 함수 내용 | hooni | 2013.12.25 | 10623 |
226 | Develop | [php] 하루 전 날짜 쉽게 구하기. | hooni | 2013.12.25 | 12257 |
225 | Develop | [js] AngularJS를 소개합니다. | hooni | 2014.01.06 | 13038 |
224 | Develop | [ios] UIButton multi-line iOS7 | hooni | 2014.01.09 | 11453 |
223 | Develop | [php] substr() 한글 자를 때 깨짐 방지 | hooni | 2014.01.09 | 20426 |
222 | Develop | [ios] UIWebView 쿠키 유지 | hooni | 2014.01.16 | 11737 |
221 | Develop | [ios] UIWebView에서 NSURLRequest에 Cookie 실어 보내기 | hooni | 2014.01.16 | 14894 |
220 | Develop | [js] 주소표시줄 URL 읽어오기 (변경까지) | hooni | 2014.01.21 | 1 |
219 | Develop | [ios] 네트워크 인디케이터(NetworkActivityIndicator) 작동 | hooni | 2014.01.24 | 12508 |
218 | Develop | [ios] iOS 6.0 이상 회전 하기 (이전 버전과 비교 변경 부분) | hooni | 2014.01.27 | 34230 |