the relationship between .dex file and .apk in Android and the dex method count limit

297 views Asked by At

Recently I'm looking at the Android Development Document.In this document,it says the project's .class files will be converted into .dex file and "Any 3rd party libraries and .class files" will be also converted into .dex files.

Here it use " .dex files". Does it mean that the project's .class files will be converted into .dex file and the 3rd party libraries and .class files will be converted into another .dex file? Or they are converted into the same dex file?

1

There are 1 answers

0
penkzhou On BEST ANSWER

From this url, I got this infomation:

Multidex support prior to Android 5.0

Versions of the platform prior to Android 5.0 use the Dalvik runtime for executing app code. By default, Dalvik limits apps to a single classes.dex bytecode file per APK. In order to get around this limitation, you can use the multidex support library, which becomes part of the primary DEX file of your app and then manages access to the additional DEX files and the code they contain.

By default, Dalvik limits apps to a single classes.dex bytecode file per APK.