Copy link to clipboard
Copied
Hello,
Since we are now able to multidex Android apps with Air 25, is there a way to specify a multiDexKeepFile to declare classes to be in the main dex file? Thanks!
Hey,
You can find a keep file in the AIRSDK at the location {AIR_SDK}/lib/android/lib/multidex-1.0.1/addToPrimaryDex.keep
Here, you can add the classes to be added in the primary dex file. Please let us know if it solves your problem.
Thanks,
Rohit
Adobe AIR Team
Copy link to clipboard
Copied
Hey,
You can find a keep file in the AIRSDK at the location {AIR_SDK}/lib/android/lib/multidex-1.0.1/addToPrimaryDex.keep
Here, you can add the classes to be added in the primary dex file. Please let us know if it solves your problem.
Thanks,
Rohit
Adobe AIR Team
Copy link to clipboard
Copied
Hello,
I see the file, but none of my additions to the keep file seem to affect the dex files. Do I need to build with a specific setting, or is the keep file always used when creating the dexs? If it's always used, do you have any thoughts on what I might be doing wrong. Let me know if I can provide you with any additional info.
Thanks!
Copy link to clipboard
Copied
Hey,
This keep file is always used.
Which classes are you trying to add to the keep file? Can you share more details on the classes, as in from where the classes are getting picked up?
Are you sure you have prepended the correct package structures with the class names?
Thanks,
Rohit
Adobe AIR Team
Copy link to clipboard
Copied
Hey,
I got it to work, thanks! While testing, I only tried moving a class over for testing. Most likely, due to dependencies, they remained in the second dex. When I added the entire list of classes from the jar, they all moved over to the first dex, pushing other classes to the second.
Copy link to clipboard
Copied
We're struggling with this at the moment; have you been able to figure out which classes are OK to have in the second dexfile? So far, for us, anything in there will not be available at runtime and will cause crashes if it's referenced.