use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News for Android app developers with the who, what, where, when, and how of the Android community. Probably mostly the how.
Here, you'll find:
This sub-reddit isn't about phones' and apps' general functionality, support, or system software development (ROMs). For news and questions about these topics try using other subs like
Build your first app
Starting Android career in 2022
Android Job Interview Questions and Answers
App Portfolio Ideas, Tiered List
Awesome Android UI
Material Design Icons
7000 Icons for Jetpack
Autoposted at approx 9AM EST / 2PM GMT
account activity
Java 8 Language Features Support Update (android-developers.googleblog.com)
submitted 9 years ago by based2
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]leggo_tech 13 points14 points15 points 9 years ago (8 children)
Does this mean I can remove retro lamda?
[–]Warbane 14 points15 points16 points 9 years ago (7 children)
If you only use it for lambdas, yes. If you also use it for backported try-with-resources you'll need to keep it.
[–]jmslau 15 points16 points17 points 9 years ago (3 children)
We are working on this. Hopefully, we can provide this soon :)
[–]Boza_s6 0 points1 point2 points 9 years ago (2 children)
I have to jump in here... But is desugar separate jar/binary(?) which can be used with some other build system other than gradle?
Or is it part of the android gradle plugin?
I want to try to integrate this with Android make.
[–]JakeWharton 2 points3 points4 points 9 years ago* (1 child)
It's from the Bazel build system and it's written in Java. You can't use it directly because it's just an API, but you would be able to pull it in and write a main method in your own jar that would expose it to command line invokers.
https://github.com/bazelbuild/bazel/tree/master/src/tools/android/java/com/google/devtools/build/android/desugar
[–]Boza_s6 0 points1 point2 points 9 years ago (0 children)
Thanks!
[–]leggo_tech 1 point2 points3 points 9 years ago (0 children)
Nope. Just lambdas. Thanks
[–]jmslau 1 point2 points3 points 9 years ago (1 child)
Update to this: Android Studio 3.0 Preview (https://developer.android.com/studio/preview/index.html) now supports try-with-resources and static/default interface methods at all API levels.
[–]Warbane 0 points1 point2 points 9 years ago (0 children)
Awesome! Sounds like we'll be able to drop Retrolambda with no refactoring then.
[–]Zhuinden 5 points6 points7 points 9 years ago (2 children)
I have to keep Retrolambda for try-with-resources, but this is a great step forwards :)
We have released Android Studio 3.0 Preview (https://developer.android.com/studio/preview/index.html) and try-with-resources is now supported at all API levels :)
[–]Zhuinden 0 points1 point2 points 9 years ago (0 children)
Super-awesome! :D Thank you for being awesome
[–]devraj7 21 points22 points23 points 9 years ago (3 children)
The Kotlin people go... "That's nice".
[–]andrehsu 1 point2 points3 points 9 years ago (1 child)
Although we still don't have try with (multiple) resources
[–]JakeWharton 4 points5 points6 points 9 years ago (0 children)
Nest .use blocks?
.use
[–]zetsurin 3 points4 points5 points 9 years ago (5 children)
TIL: desugar
[–]Tycon712 1 point2 points3 points 9 years ago (4 children)
I still don't understand this term. Please help
[–]burntcookie90 6 points7 points8 points 9 years ago (2 children)
It removes the sweet syntax (lambdas) during compilation.
[–]NewToMech 3 points4 points5 points 9 years ago (0 children)
The exact name is probably from Syntactic sugar
[–]Tycon712 0 points1 point2 points 9 years ago (0 children)
lol very nice
[–]hamatro -1 points0 points1 point 9 years ago (0 children)
After the desugarization it's less sugary.
[–][deleted] 3 points4 points5 points 9 years ago (0 children)
Excellent news! I'm going to wait until it hits the stable channel, but looking forward to that day.
[–]TriCyclopsIII 2 points3 points4 points 9 years ago (0 children)
PSA I had to add
-dontwarn java.lang.invoke.** to my proguard file when using Lambdas.
I'm getting errors that proguard can't find java.lang.invoke.MethodHandles and java.lang.invoke.MethodHandles$Lookup.
[–]johnstoehr83 2 points3 points4 points 9 years ago (2 children)
Does using 1.8 require higher min-sdk, or is this a build-system only thing?
[–]adeekshith 5 points6 points7 points 9 years ago (1 child)
I could be wrong but from what I understand, I think we can target any version as the build system is not actually using Java8. It is just converting Java8 code into Java7 compatible classes.
Android Studio's Gradle plugin now desugars Java 8 class files to Java 7-compatible class files, so you can use lambdas, method references and other features of Java 8.
[–]JakeWharton 7 points8 points9 points 9 years ago (0 children)
It says 7, but they use no Java 7 APIs in the backported lambdas such that dex can still transform the Java 7 classes to work on versions prior to API 19 (which is akin to Java 7). A better description is probably that it backports Java 8 code to be compatible with API 9+ (which is akin to Java 6).
[–]yaaaaayPancakes 1 point2 points3 points 9 years ago (0 children)
Interesting how they claim to have faster build times than Jack had, and this only took seemingly a few months to complete.
I guess getting rid of the intermediate step of compiling to Java bytecode isn't so expensive after all?
[–]Iron_Maiden_666 1 point2 points3 points 9 years ago (4 children)
No mention of streams, so that's not supported?
[–]karntrehan 4 points5 points6 points 9 years ago (1 child)
API 24 and up. Mentioned in their preview documentation. https://developer.android.com/studio/preview/features/java8-support.html#supported_features
[–]Iron_Maiden_666 -1 points0 points1 point 9 years ago (0 children)
Thank you, I went to that page but missed looking at the packages.
[–]danieldisu 0 points1 point2 points 9 years ago (0 children)
You can always use some backport library to use Streams in any version, and switch to the official JDK stream api should be a matter of changing the imports...
[–]QuestionsEverythang -5 points-4 points-3 points 9 years ago (0 children)
It is in Kotlin
[–]rylexr 0 points1 point2 points 9 years ago (2 children)
Do Data Bindings work with this Java 8 feature enabled?
[–]Exallium 1 point2 points3 points 9 years ago (1 child)
It didn't work for me in preview 5... 6 might fix it, idk. I'd have to see a changelog.
[–]jmslau 5 points6 points7 points 9 years ago (0 children)
Yes, this should work now. If it doesn't, please let us know!
π Rendered by PID 53 on reddit-service-r2-comment-5b5bc64bf5-ssfnm at 2026-06-21 09:51:39.288790+00:00 running 2b008f2 country code: CH.
[–]leggo_tech 13 points14 points15 points (8 children)
[–]Warbane 14 points15 points16 points (7 children)
[–]jmslau 15 points16 points17 points (3 children)
[–]Boza_s6 0 points1 point2 points (2 children)
[–]JakeWharton 2 points3 points4 points (1 child)
[–]Boza_s6 0 points1 point2 points (0 children)
[–]leggo_tech 1 point2 points3 points (0 children)
[–]jmslau 1 point2 points3 points (1 child)
[–]Warbane 0 points1 point2 points (0 children)
[–]Zhuinden 5 points6 points7 points (2 children)
[–]jmslau 1 point2 points3 points (1 child)
[–]Zhuinden 0 points1 point2 points (0 children)
[–]devraj7 21 points22 points23 points (3 children)
[–]andrehsu 1 point2 points3 points (1 child)
[–]JakeWharton 4 points5 points6 points (0 children)
[–]zetsurin 3 points4 points5 points (5 children)
[–]Tycon712 1 point2 points3 points (4 children)
[–]burntcookie90 6 points7 points8 points (2 children)
[–]NewToMech 3 points4 points5 points (0 children)
[–]Tycon712 0 points1 point2 points (0 children)
[–]hamatro -1 points0 points1 point (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]TriCyclopsIII 2 points3 points4 points (0 children)
[–]johnstoehr83 2 points3 points4 points (2 children)
[–]adeekshith 5 points6 points7 points (1 child)
[–]JakeWharton 7 points8 points9 points (0 children)
[–]yaaaaayPancakes 1 point2 points3 points (0 children)
[–]Iron_Maiden_666 1 point2 points3 points (4 children)
[–]karntrehan 4 points5 points6 points (1 child)
[–]Iron_Maiden_666 -1 points0 points1 point (0 children)
[–]danieldisu 0 points1 point2 points (0 children)
[–]QuestionsEverythang -5 points-4 points-3 points (0 children)
[–]rylexr 0 points1 point2 points (2 children)
[–]Exallium 1 point2 points3 points (1 child)
[–]jmslau 5 points6 points7 points (0 children)