0

I was wondering if multidexing supported by Google for InstantApps. The question is that it is intended to be used for small apps, but does this mean it won't run at all with multidexing?

Volo
  • 28,673
  • 12
  • 97
  • 125
X-HuMan
  • 1,488
  • 1
  • 17
  • 37

1 Answers1

4

Multidex is supported for instant apps, so if you have an app that satisfies the maximum size requirement, but contains more methods than the dex limit (65k methods,) you can still publish it as an instant app.

However, larger dex and multidex have a performance impact, so please consider ways to decrease method count (like fine tuning ProGuard rules, remove unused code, etc.) to achieve optimal performance. It is recommended that you break up the instant app into several features, and each feature APK. See the documentation on Structure of an instant app with multiple features for how to build an Instant App with multiple features.

Edilaic
  • 33
  • 3
Jichao Li
  • 189
  • 4
  • Do you mean this sentence for "Multiple dexes are not supported within a single APK" for instance apps? Actually I was having problem because of resources and it seems the problem is not solved with disabling multidexing, so I can say multidexing is working also. Of course in general it wouldn't make sense if you use pro-guard, but the base feature sometimes is big enough. – X-HuMan Jul 12 '17 at 09:43
  • 1
    Yeah I mean in the context of instant apps, multiple dexes aren't supported within a single APK. If you have multiple, the behavior is undefined and could be an error. Edited my answer to clarify. – Jichao Li Jul 12 '17 at 16:12