Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
조회 수 762 댓글 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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
85 | Develop | [ios][swift] 초간단 To-do Memo | hooni | 2016.06.27 | 1075 |
84 | Develop | [ios] StoryBoard(xib) 없이 프로젝트 만들기 | hooni | 2015.02.12 | 1073 |
83 | Develop | [ios] 최상위 ViewController 가져오기 | hooni | 2015.10.12 | 1069 |
82 | Develop | [ios] 로컬에 있는 html 실행하기 | hooni | 2015.02.10 | 1035 |
81 | Develop | [ios] Did UIScrollView End Scrolling? | hooni | 2016.04.19 | 1030 |
80 | Develop | [c] FSN 온라인 코딩 테스트 (Sorting, Binary Search) | hooni | 2015.06.26 | 1013 |
79 | Develop | [js] 스크롤 이벤트 막기 | hooni | 2015.04.14 | 1012 |
78 | Develop | [ios] Xcode의 디버그 모드에서 콜스택 | hooni | 2015.01.03 | 1006 |
77 | Develop | '2014 모바일 개발 트렌드' 발표자료입니다. | hooni | 2014.10.02 | 988 |
76 | Develop | [ios] APNS, Remote Push 수신 시점에서 앱의 3가지 실행 상태 | hooni | 2018.10.19 | 978 |
75 | Develop | [ios] 오브젝티브C→스위프트, 코드 변환 손쉽게 | hooni | 2015.08.07 | 965 |
74 | Develop | [ios] 상위 ViewController 가져오기 | hooni | 2015.10.12 | 962 |