Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Studio - What's new 2020

Android Studio - What's new 2020

In this talk, we will take a look at the new Android Studio 4.0 and the tooling that has been added in this new release. Looking at how we can now inspect Databases, use the new Motion Editor and other small treats that the latest release has included. Join to learn about all the new goodies you can play around with in Android Studio!

Rebecca is a Principal Android Engineer at Over (acquired by GoDaddy), she has been passionately building Android Apps for over 8 years now. She loves making beautiful Android Apps and teaching others all the tricks she learns along the way. She is a Google Developer Expert for Android and blogs regularly at https://riggaroo.dev. When she isn't coding or teaching, she can be found baking up a storm in her kitchen.

Rebecca Franks

August 05, 2020
Tweet

More Decks by Rebecca Franks

Other Decks in Programming

Transcript

  1. Android Studio 4.0 Treats • Motion Editor • Live Layout

    Inspector • Multi preview of Layouts • Java 8 library desugaring • Gradle build analyser
  2. Motion Editor UI Tool for editing & previewing Motion Scene

    Files from MotionLayout bit.ly/motion-editor
  3. Live Layout Inspector - Similar to Chrome Developer Tools -

    Real time information whilst running on device - 3D Preview - Property resolution - Why is this colour blue?
  4. Layout Validation ✅ - Help makes your layouts by showing

    you different previews - Preview different font sizes, common types of colour blindness, languages etc
  5. Java 8 library desugaring AS now includes support for using

    a number of Java 8 language APIs without requiring a minimum API level for your app. In AS 4.0, the desugaring engine extended to be able to desugar Java language APIs: • Sequential streams (java.util.stream) • A subset of java.time • java.util.function • Recent additions to java.util.{Map,Collection,Comparator} • Optionals java.util.Optional • Additional methods to AtomicInteger etc • ConcurrentHashMap
  6. Java 8 library desugaring android { defaultConfig { // Required

    when setting minSdkVersion to 20 or lower multiDexEnabled true } compileOptions { // Flag to enable support for the new language APIs coreLibraryDesugaringEnabled true // Sets Java compatibility to Java 8 sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.4' }
  7. Build Analyzer - Diagnose issues with your build process &

    provide valuable build info - Make sure you are using Android Gradle Plugin 4.0.0 (or higher)
  8. Android Studio 4.2 Treats • Database Inspector (4.1+) • New

    project template using Material Components (4.1+) • TensorFlow Lite Model Binding (4.1+) • Run Android Emulator inside AS (4.1+) • Jetpack Compose Previews + Run on device (4.2 Preview)
  9. Material Components in AS New Project template in Android Studio

    is now using the MaterialComponents theming
  10. TensorFlow Lite Model binding - ML Model binding makes it

    easier to import .tflite files and use them in your projects. - Android Studio generates easy to use classes to make use of it. https://www.tensorflow.org/lite/guide/codegen
  11. Jetpack Compose Previews - Support for Interactive previews (click buttons

    to see how state changes) - Deploy to device - deploy a snippet of code to your device, helps make testing and development easier