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

multiDexKeepFile

New Here ,
Feb 28, 2017 Feb 28, 2017

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!

TOPICS
Air beta

Views

1.3K

Translate

Translate

Report

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

Votes

Translate

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

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

Votes

Translate

Translate

Report

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

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!

Votes

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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