Android

Unable to execute dex: method ID not in [0, 0xffff]: 65536 Conversion

tomato13 2013. 4. 30. 22:33

Unable to execute dex: method ID not in [0, 0xffff]: 65536 Conversion

to Dalvik format failed: Unable to execute dex: method ID not in [0,0xffff]: 65536


Softmaker에서 건네준 Project를 빌드하는데 위의 error가 발생했다. syntax error는 아니었고 apk 생성직전 발생하였다. googling해보니, dex파일은 method의 개수 제한(max: 65536)을 가진다는 것을 알게 되었다. 


분석을 해보니 과다하게 library를 중복하여 add한 것을 알게 되었고 최적화하니 문제는 더이상 발생하지 않았다.