Gradle builds fail with MOZ_INSTALL_TRACKING: com.android.dex.DexIndexOverflowException

NEW
Unassigned

Status

()

P5
normal
3 years ago
3 months ago

People

(Reporter: mcomella, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 8718631 [details]
gistfile1.txt

More specifically, it fails with:

Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexIndexOverflowException: Cannot merge new index 71430 into a non-jumbo instruction!
...
:app:dexAutomationDebug FAILED
:app:dexAutomationDebug (Thread[Task worker,5,main]) completed. Took 3.004 secs.
Unexpected failure during lint analysis of MatrixBlobCursor.java (this is a bug in lint or one of the libraries it depends on)

---
I believe I've seen it fail in base:lint before too.

I have the following flags added to my moz config to enable adjust support:
* MOZ_INSTALL_TRACKING
* MOZ_NATIVE_DEVICES
* RELEASE_BUILD

Full stack (--info/debug/stacktrace) available in attachment.
I did confirm the build works when I remove the flags from my mozconfig and `mach gradle clean build`.
I'm concerned that this means we might hit the dex limit soon – how important is it to fix this, Nick?
Flags: needinfo?(nalexander)
Oh, that's concerning. I remember seeing an issue with google play services 8.1 making the app grow a lot because of mingled dependencies. And we added a new play services dependency recently (and we are still using 8.1), right? This has later been fixed in an update.

Can you build after using a more recent version (8.3 or 8.4) in your build.gradle?
(In reply to Sebastian Kaspari (:sebastian) from comment #3)
> Oh, that's concerning. I remember seeing an issue with google play services
> 8.1 making the app grow a lot because of mingled dependencies. And we added
> a new play services dependency recently (and we are still using 8.1), right?
> This has later been fixed in an update.

This blog mentions ~200KB of extra code because of the dependency mix in 8.1:
https://medium.com/google-developer-experts/warning-for-google-analytics-users-44b0096084e2#.intkzr41h
(In reply to Sebastian Kaspari (:sebastian) from comment #4)
> (In reply to Sebastian Kaspari (:sebastian) from comment #3)
> > Oh, that's concerning. I remember seeing an issue with google play services
> > 8.1 making the app grow a lot because of mingled dependencies. And we added
> > a new play services dependency recently (and we are still using 8.1), right?
> > This has later been fixed in an update.
> 
> This blog mentions ~200KB of extra code because of the dependency mix in 8.1:
> https://medium.com/google-developer-experts/warning-for-google-analytics-
> users-44b0096084e2#.intkzr41h

I observed this as well.  The bloat will largely be addressed by Bug 1247047.
Flags: needinfo?(nalexander)
(In reply to Michael Comella (:mcomella) from comment #2)
> I'm concerned that this means we might hit the dex limit soon – how
> important is it to fix this, Nick?

You are seeing this in Gradle, which is not running Proguard.  I'm very concerned we will hit this in our release builds but I expect to address Bug 1247047 soon enough that we'll not see it.

I would be thrilled to track the method count of our Proguarded classes.dex file, though.
(In reply to Nick Alexander :nalexander from comment #6)
> I would be thrilled to track the method count of our Proguarded classes.dex
> file, though.

I recently started this on Github, maybe it's useful for that:
https://github.com/KeepSafe/dexcount-gradle-plugin
(In reply to Sebastian Kaspari (:sebastian) from comment #7)
> I recently started this on Github, maybe it's useful for that:
> https://github.com/KeepSafe/dexcount-gradle-plugin

s/started/starred

Updated

a year ago
See Also: → bug 1367768
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.