본문 바로가기

반응형
Notice
Recent Posts
Recent Comments
Link
«   2025/10   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Total
Today
Yesterday
관리 메뉴

[Unity/Android] The number of method references in a .dex file cannot exceed 64K 본문

프로그래밍/ㄴ이슈

[Unity/Android] The number of method references in a .dex file cannot exceed 64K

최갓 2020. 12. 29. 15:25
반응형

애드몹 미디에이션 패키지를 추가하고 빌드하니 다음과 같은 에러가 발생했다.

 

The number of method references in a .dex file cannot exceed 64K

분명 이미 멀티덱스 세팅을 했을텐데도 위와 같은 에러가 발생해 당황스러웠지만,

아래 방법으로 해결했다.

 

Unity BuildSetting에서 Custom Launcher Gradle Template를 체크해준다.

그럼 LauncherTemplate.gradle파일이 생성된다.

 

 defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        applicationId '**APPLICATIONID**'
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
        multiDexEnabled true //해당 옵션 추가
    }

 

gradle파일에 multiDexEnable true옵션을 넣어주자.

반응형
Comments