Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

multiDexKeepFile

New Here ,
Feb 28, 2017 Feb 28, 2017

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!

TOPICS
Air beta
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Mar 01, 2017 Mar 01, 2017

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

Translate
Adobe Employee ,
Mar 01, 2017 Mar 01, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2017 Mar 01, 2017

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 02, 2017 Mar 02, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 02, 2017 Mar 02, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 12, 2017 Apr 12, 2017
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines