Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
Views 889 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 |
---|---|---|---|---|---|
69 | Develop | [php][laravel] 라라벨 개발환경 세팅하기 (Mac, Window) 2 | hooni | 2017.12.15 | 2765 |
68 | Develop | Laravel 5 Failed opening required bootstrap/../vendor/autoload.php | hooni | 2018.01.24 | 1828 |
67 | Develop | [php] Laravel Route에서 PC/Mobile 분기 | hooni | 2018.01.24 | 2661 |
66 | Develop | What is difference between Get, Post, Put and Delete? | hooni | 2018.02.28 | 1563 |
65 | System/OS | 콘솔에서 패스워드 걸린 zip 압축하는 명령 | hooni | 2018.03.02 | 1120 |
64 | System/OS | [mac] 맥에서 기본 실행 앱 변경하기 | hooni | 2018.03.02 | 1963 |
63 | Develop | [python] DJI Tello 드론 코딩 (프로그래밍) 58 | hooni | 2018.03.04 | 26110 |
62 | Develop | How to Test SMTP AUTH using Telnet | hooni | 2018.04.05 | 1582 |
61 | System/OS | How to Setup an Email Server on CentOS 7 | hooni | 2018.04.05 | 3027 |
60 | Develop | [php] Laravel 4. twitter bootstrap 적용하기 | hooni | 2018.04.05 | 2690 |
59 | Develop | [js] Click button copy to clipboard | hooni | 2018.04.05 | 1288 |
58 | Develop | [api] 인스타그램에서 최신 이미지 가져오기 (Using Instagram API) 20 | hooni | 2018.04.05 | 12599 |