Android 64k method limit error on 56k methods

前端 未结 5 874
攒了一身酷
攒了一身酷 2021-01-06 23:42

I\'m receiving this error in my android project:

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


        
5条回答
  •  清酒与你
    2021-01-07 00:11

    Are you using obfuscation? Proguard can remove non-used method, so you will fit in the limit. Also, you could split your project into modules. The 65k limit is per dex file, and module is separate dex file.

    You could also configure Proguard to inline short methods- thay should remove a lot of short methods.

    See http://fuzzproductions.com/news/the-mythical-android-method-limit-solved and How to solve the issue with Dalvik compiler limitation on 64K methods? for details.

提交回复
热议问题