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.

2a37bf1e025cc1523124774c760df91a?s=128

Rebecca Franks

August 05, 2020
Tweet

Transcript

  1. Rebecca Franks Android Engineer & GDE @riggaroo What’s new in

    Android Studio?
  2. Android Studio 4.0

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

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

    Files from MotionLayout bit.ly/motion-editor
  5. None
  6. Resources bit.ly/motion-editor < video bit.ly/motion-layout < blog

  7. Live Layout Inspector - Similar to Chrome Developer Tools -

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

    you different previews - Preview different font sizes, common types of colour blindness, languages etc
  9. 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
  10. 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' }
  11. 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)
  12. None
  13. None
  14. None
  15. Android Studio 4.2 Preview

  16. 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)
  17. Database Inspector - Query, modify your app’s database in real

    time whilst its running.
  18. Material Components in AS New Project template in Android Studio

    is now using the MaterialComponents theming
  19. None
  20. 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
  21. None
  22. More TensorFlow Learning https://github.com/margaretmz/icon-classifier https://codelabs.developers.google.com/codelabs/recognize-flowers-with- tensorflow-on-android-beta/#0

  23. Emulator inside Android Studio Preferences -> Emulator -> Launch in

    a tool window
  24. None
  25. 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
  26. None
  27. Resources https://developer.android.com/studio

  28. Rebecca Franks Android Engineer & GDE @riggaroo Thank you!