Develop
2016.11.10 14:14
[Android Error] The number of method references in a .dex file cannot exceed 64K
Views 894 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 |
---|---|---|---|---|---|
1113 | System/OS | How to Setup an Email Server on CentOS 7 | hooni | 2018.04.05 | 3033 |
1112 | Develop | How to Test SMTP AUTH using Telnet | hooni | 2018.04.05 | 1589 |
1111 | Develop | [python] DJI Tello 드론 코딩 (프로그래밍) 58 | hooni | 2018.03.04 | 26874 |
1110 | System/OS | [mac] 맥에서 기본 실행 앱 변경하기 | hooni | 2018.03.02 | 1968 |
1109 | System/OS | 콘솔에서 패스워드 걸린 zip 압축하는 명령 | hooni | 2018.03.02 | 1132 |
1108 | Develop | What is difference between Get, Post, Put and Delete? | hooni | 2018.02.28 | 1568 |
1107 | Develop | [php] Laravel Route에서 PC/Mobile 분기 | hooni | 2018.01.24 | 2670 |
1106 | Develop | Laravel 5 Failed opening required bootstrap/../vendor/autoload.php | hooni | 2018.01.24 | 1832 |
1105 | Develop | [php][laravel] 라라벨 개발환경 세팅하기 (Mac, Window) 2 | hooni | 2017.12.15 | 2775 |
1104 | Develop | [php][laravel] 라라벨 프로젝트 생성 및 구조 | hooni | 2017.12.15 | 2556 |
1103 | Develop | [php][laravel] 초간단 MacOS에서 Laravel 개발 환경 구축 | hooni | 2017.12.15 | 2118 |
1102 | Database | [mysql] MacOS에 MySQL 설치, 설정, 암호 재설정 | hooni | 2017.12.15 | 1618 |