Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
조회 수 750 댓글 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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
781 | Develop | [swift] 실행시간 측정하기 | hooni | 2021.09.14 | 670 |
780 | Develop | [swift] UIView에서 subview 찾기 | hooni | 2022.12.09 | 1621 |
779 | Develop | [swift] popToRoot 모달뷰, 네비게이션컨트롤러 한꺼번에 닫기 | hooni | 2021.01.29 | 1377 |
778 | Develop | [swift] NotificationCenter 간단 예제 | hooni | 2021.01.27 | 8107 |
777 | Develop | [spring] 스프링 IoC/DI | hooni | 2013.04.23 | 11347 |
776 | Develop | [sh] 쉘스크립트 if 비교 연산 | hooni | 2020.05.26 | 59130 |
775 | Develop | [sh] html 안에 있는 img 다운 받는 쉘 스크립트 | hooni | 2020.05.26 | 631 |
774 | Develop | [python][django] request.cookie 읽어오기 ㅋㅋㅋ (쓰기) | hooni | 2019.12.06 | 1682 |
773 | Develop | [python] 파이썬 공부하는 사이트~ | hooni | 2013.11.12 | 10833 |
772 | Develop | [python] 파라미터 앞에 *, ** 의 의미? (*args, **kwargs) | hooni | 2019.11.22 | 1547 |
771 | Develop | [python] 애니팡, 캔디팡 매크로 | hooni | 2013.09.06 | 17304 |
770 | Develop | [python] DJI Tello 드론 코딩 (프로그래밍) 58 | hooni | 2018.03.04 | 25737 |