I built both opt and debug with the new SDK and support lib, and haven’t had any problem with installing onto a 2.3 device. Must be something else going on.
James > On Oct 29, 2014, at 12:54 PM, Chris Kitching <[email protected]> wrote: > > Proguard has a class merging feature that will mitigate this problem as well > as save binary size. > > In Fennec, this feature is turned off because the example config file from > Google I was using as a template contained a comment warning that this can > crash early versions of Dalvik. > > We may no longer care. The options should be pretty straightforward to spot > in profuard.cfg (but I'll post again with mxr links if desired when I'm not > on a phone). > > I suggest investigating this before trying Facebook's selections of utter > insanity. > > On 29 Oct 2014 16:32, "James Willcox" <[email protected] > <mailto:[email protected]>> wrote: > > >> On Oct 29, 2014, at 11:07 AM, Richard Newman <[email protected] >> <mailto:[email protected]>> wrote: >> >> When I build and install Fennec on my 2.3 hardware, I hit an error that >> we’re exceeding LinearAlloc capacity. Gingerbread has a 5MB limit. ICS and >> up have 8MB. >> >> I don’t hit this with builds from infra. I recently upgraded support library >> and SDK; I’m pretty confident that before the upgrade I was able to install >> my built APKs. >> >> >> Doing some reading, this seems to occur when you have deep interface >> hierarchies, and/or lots of classes. You’ll see this issue cited a lot: >> >> https://code.google.com/p/android/issues/detail?id=22586 >> <https://code.google.com/p/android/issues/detail?id=22586> >> >> but lots of other folks seem to hit this just by using fat libraries (e.g., >> JodaTime). You start dumping Facebook libs, rendering libs, datetime libs >> into your project, and suddenly it won’t install. E.g., >> >> http://www.birbit.com/how-to-solve-linearalloc-problem/ >> <http://www.birbit.com/how-to-solve-linearalloc-problem/> >> >> >> We do use fat libraries, we are a big project, and so I suspect we’re >> hovering right around 5MB with old tools, and over 5MB with new ones. >> >> Another hypothesis is that method name collisions (typically across >> libraries) will b0rk things, but I don’t see evidence of that in my ADB log. >> >> >> So I’m concerned: an infra upgrade could just break 2.3 devices, for one >> thing. > > Yeah, that’s worrying. Presumably our 2.3 emulator testing would catch this, > though. > >> >> Has anyone else hit this? > > Facebook has, and came up with an insane hack to work around it: > https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920 > > <https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920> > > I think if it comes to it, we can use the same hack. > >> >> >> My expectation would be that ProGuard would eliminate enough code to fix >> this, but perhaps it’s not aggressively pruning library code. > > I would like to know how much ProGuard strips out. Do we have that somewhere? > Does ProGuard make that easily available? > > James > > > > _______________________________________________ > mobile-firefox-dev mailing list > [email protected] <mailto:[email protected]> > https://mail.mozilla.org/listinfo/mobile-firefox-dev > <https://mail.mozilla.org/listinfo/mobile-firefox-dev> >
_______________________________________________ mobile-firefox-dev mailing list [email protected] https://mail.mozilla.org/listinfo/mobile-firefox-dev

