Slide 1

Slide 1 text

Rebecca Franks Android Engineer & GDE @riggaroo What’s new in Android Studio?

Slide 2

Slide 2 text

Android Studio 4.0

Slide 3

Slide 3 text

Android Studio 4.0 Treats • Motion Editor • Live Layout Inspector • Multi preview of Layouts • Java 8 library desugaring • Gradle build analyser

Slide 4

Slide 4 text

Motion Editor UI Tool for editing & previewing Motion Scene Files from MotionLayout bit.ly/motion-editor

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Resources bit.ly/motion-editor < video bit.ly/motion-layout < blog

Slide 7

Slide 7 text

Live Layout Inspector - Similar to Chrome Developer Tools - Real time information whilst running on device - 3D Preview - Property resolution - Why is this colour blue?

Slide 8

Slide 8 text

Layout Validation ✅ - Help makes your layouts by showing you different previews - Preview different font sizes, common types of colour blindness, languages etc

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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' }

Slide 11

Slide 11 text

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)

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Android Studio 4.2 Preview

Slide 16

Slide 16 text

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)

Slide 17

Slide 17 text

Database Inspector - Query, modify your app’s database in real time whilst its running.

Slide 18

Slide 18 text

Material Components in AS New Project template in Android Studio is now using the MaterialComponents theming

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

More TensorFlow Learning https://github.com/margaretmz/icon-classifier https://codelabs.developers.google.com/codelabs/recognize-flowers-with- tensorflow-on-android-beta/#0

Slide 23

Slide 23 text

Emulator inside Android Studio Preferences -> Emulator -> Launch in a tool window

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Resources https://developer.android.com/studio

Slide 28

Slide 28 text

Rebecca Franks Android Engineer & GDE @riggaroo Thank you!