?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
# 에러 내용
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);
    }
}


?

List of Articles
No. Category Subject Author Date Views
1093 Develop [ios] 아이폰 앱 이름 및 버전 정보 hooni 2015.03.24 846
1092 Develop [ios] URL 랜딩 속도(OpenURL 10초 정지되는) 이슈 hooni 2015.02.09 847
1091 Develop [ios] 문자열로 함수 실행하기 (eval 함수처럼) hooni 2015.02.10 849
1090 Develop [android] AlertDialog 메시지 창 띄우기 hooni 2015.07.09 849
1089 Develop [android] N-Puzzle 게임 file hooni 2015.07.09 863
1088 Develop XE Core 1.8.18 본문 작성시 태그(html) 사라지는 버그 file hooni 2016.04.21 864
1087 Develop [ios] iOS 앱 아이콘을 만드는 유틸 file hooni 2015.01.03 867
1086 Develop [ios] ViewController Push할 때 애니메이션 효과 hooni 2015.10.23 870
1085 Develop [git] 쉬운 버전관리 Git 설명 hooni 2015.08.18 872
1084 PPT [ppt] Information Security 발표 자료 (@Team Study 2012.11.15) file hooni 2015.07.22 876
1083 System/OS [mac] OS X 엘 캐피탄에서 Soudflower 사용하기 2 file hooni 2016.10.03 878
1082 Develop [c] RSA 암호화 구현(gmp 라이브러리 활용) file hooni 2016.10.03 880
1081 System/OS [mac] How to uninstall MySQL on Mac OS. hooni 2017.11.08 884
1080 Develop [js] AngularJS 란? file hooni 2015.11.26 885
1079 Develop [ios] APNS에 사용할 인증서 만들기 (KeyChain에 있는 인증서 Export) file hooni 2015.01.03 889
1078 Develop [ios] UIWebView에서 로컬에 있는 html 파일 불러오기 hooni 2015.02.10 889
Board Pagination Prev 1 4 5 6 7 8 ... 74 Next
/ 74