Giter Site home page Giter Site logo

Comments (6)

staltz avatar staltz commented on May 5, 2024

We don't see Guava as bringing enough value into the code base, so given its size, we prefer to avoid it.

We'll write about multi-dexing soon in the future.

from android-best-practices.

jaggernod avatar jaggernod commented on May 5, 2024

Multidexing on older platform is going to be quite slow.
We need to decide how fast should a debug build be. If we want to build multiple flavors of a big project then we might as well grab a coffee or rather 3 course dinner.

But I agree that getting rid of a big utility library just due to 65k problem seems rather silly.

from android-best-practices.

jonikarppinen avatar jonikarppinen commented on May 5, 2024

For what it's worth, admittedly there's no real consensus about Guava on Android among Futurice developers.

I for one used Guava in one of our customer projects and was completely happy with that choice (in that case the app was not huge so we were not close to 65k limit).

So I wouldn't use a statement as strong as "avoid Guava" myself, and depending on the needs, I'd consider using Guava also in the future, going multidex if necessary. (But if I'd be mostly using stuff like Lists.newArrayList(), that hardly justifies adding the lib. :-) )

On top of that, I think Proguard will strip out any methods you don't end up actually using there

But you won't use ProGuard on e.g. debug builds, so you do need take take the largeish method count into consideration. Anyway, agreed that we should cover multidexing in the guide. (Maybe I'll do it if I find the time to look into it.)

from android-best-practices.

AlexanderKaraberov avatar AlexanderKaraberov commented on May 5, 2024

I agree with @pimterry that Guava is not an issue. It offers a lot of goodies, which simplify development and I used for a lot of projects - the code become clearer with it (if use it reasonably of course). Maybe when we will have Java 8 Streams we can avoid Guava.
With the help of ProGuard and now Multidex support 65K will not be an issue.
I posted a question more than two years ago on stackoverflow: http://stackoverflow.com/questions/14978699/is-it-a-good-idea-to-use-google-guava-library-for-android-development about the same issue.

from android-best-practices.

peter-tackage avatar peter-tackage commented on May 5, 2024

I didn't really see the value in Guava, given the pressure it put on method limits. However, a few months back I saw a talk that demoed an app that showed it's strengths and I was fairly impressed. I think the key is that if you use Guava, use it thoroughly and get real value from it; it's a good, reliable library.

With the somewhat recent modularization of Google Play Services, the pressure on method limits has eased somewhat, making the benefits of using Guava less of a trade-off.

from android-best-practices.

peter-tackage avatar peter-tackage commented on May 5, 2024

Closing this discussion due to inactivity.

from android-best-practices.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.