Comments (6)
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.
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.
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.
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.
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.
Closing this discussion due to inactivity.
from android-best-practices.
Related Issues (20)
- Recommend Dependency Injection using Dagger 2
- Recommend sharing your **debug** signing key HOT 1
- Recommend sharing your IDE code formatters HOT 4
- Simplify Gradle recommendations
- Simplify Android Studio recommendation HOT 2
- Add minSdk recommendation new projects HOT 1
- Encourage sensible use of Android Support Annotations
- Add RxJava testing guidance HOT 1
- Revise our recommendations for persistence storage HOT 2
- Add reference to Spice program in summary HOT 2
- Investigate different format for README HOT 3
- Recommend using MVP as application Architecture HOT 1
- Adding an Android logo and Futurice label below it HOT 1
- Colors.xml: use two levels of color definition HOT 4
- Always use Proguard (in debug too!) HOT 2
- Jackson link is dead :)
- Managing dependencies
- Лучшие практики на Андроид
- Can I learn Android Development in Java as a beginner? HOT 2
- Andrpid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-best-practices.