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

What's new in Android Develop

What's new in Android Develop

Google IO Extended 2021 Korea Android에서 발표한 "What's new in Android Develop" 입니다

pluulove (노현석)

July 03, 2021
Tweet

More Decks by pluulove (노현석)

Other Decks in Programming

Transcript

  1. Reference 2 What’s new in Android development tools What's new

    in Android testing tools New in design tools
  2. 4.2 Project upgrade assistant Safe Args support Apply changes update

    Gradle compatibility and configuration changes Quality Bumblebee Android Testing android studio 3 Arctic Fox New in app inspection JDK 11 required to run AGP 7.0 Compose support in the Layout Inspector StateFlow support in data binding Gradle test runner Support for Jetpack Compose New test matrix for multi-device testing
  3. 4 02 Android Studio Arctic Fox 01 Android Studio 4.2

    03 Android Studio Bumblebee 04 Design Tools 05 Summary
  4. 6 4.1.3 OpenJDK 1.8.0 4.2.1 OpenJDK 11.0.8 Arctic Fox Beta

    5 OpenJDK 11.0.10 Bumblebee Canary 2 OpenJDK 11.0.10
  5. - Java SE ೒ۖಬ੄ ݽٕച بੑ - ౵ੌ दझమਸ ࢓ಝࠁݶ

    ಫ؊ ҳઑо ੉੹ ߡ੹җ ࢚੉ೣ - ੉੹ ߡ੹ীࢲח Java SE੄ JRE + ѐߊ بҳ ߂ ۄ੉࠳۞ܻܳ ನೣೠ JDKо ನೣ JDK 9+ Migration 7 Java Platform, Standard Edition Oracle JDK 9 Migration Guide https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-7744EF96-5899-4FB2- B34E-86D49B2E89B6
  6. 8 Android Studio Bundle in Open JDK Run Android Studio

    Run Gradle Task Installed Android Studio
  7. Installed Android Studio 9 Android Studio Bundle in Open JDK

    Run Android Studio Run Gradle Task Project Structure
  8. 10 02 Android Studio Arctic Fox 01 Android Studio 4.2

    03 Android Studio Bumblebee 04 Design Tools 05 Summary
  9. 11 2020.3.1 Arctic Fox Year of Intellij Version Intellij Major

    version Studio Major version IntelliJ Platform version
  10. 16 JDK 11 required to run AGP 7.0 - AGP

    7.0ਸ ࢎਊೞৈ ࠽٘ ೡ ٸ Gradleਸ प೯ ೞ۰ݶ JDK 11੉ ೙ࣻ - Android Studio Arctic Foxী JDK 11੉ ߣٜ۽ ઁҕ JDK 11 required to run AGP 7.0 https://developer.android.com/studio/preview/features#agp-7-0-jdk-11 Gradle JDK ࢸ੿ - Preferences > Build, Execution, Deployment > Build Tools > Gradle
  11. 17 Android Gradle plugin 7.0 ೐۽ં౟ীࢲ Java 11 ࣗझ ௏٘

    ஹ౵ੌ оמ // build.gradle.kts android { compileSdkVersion(30) compileOptions { sourceCompatibility(JavaVersion.VERSION_11) targetCompatibility(JavaVersion.VERSION_11) } kotlinOptions { jvmTarget = "11" } } Android Gradle plugin 7.0 https://developer.android.com/studio/preview/features#android_gradle_plugin_70
  12. Android Studio now uses Gradle test runner 18 Test Android

    Studio now uses Gradle test runner https://developer.android.com/studio/preview/features#test-configurations Android Studioীࢲ Gradleਸ ࢎਊೞৈ ױਤ పझ౟ܳ प೯
  13. 19

  14. 20

  15. 21

  16. New test matrix for multi-device testing 22 Test Instrumented testܳ

    ৈ۞ ӝӝীࢲ ߽۳۽ प೯ పझ౟ Ѿҗ ಁօਸ ࢎਊೞৈ API ࣻળ ژח ೞ٘ਝয ࣘࢿਵ۽ ੋ೧ పझ౟о पಁೞח૑ ഛੋ
  17. 23

  18. 27 02 Android Studio Arctic Fox 01 Android Studio 4.2

    03 Android Studio Bumblebee 04 Design Tools 05 Summary
  19. Unified Gradle test runner 29 Test Instrumented testܳ प೯ೡ ٸ

    Gradle੄ Android Instrumented test runnerܳ ా೧ࢲ प೯
  20. 32 Unified Gradle test runner https://developer.android.com/studio/preview/features#bumblebee-unified-test-runner Run Android instrumented tests

    using Gradle Android Studio৬ Android Gradle Pluginীࢲ زੌೠ Android instrumented test runnerܳ ࢎਊ
  21. Unified Gradle test runner https://developer.android.com/studio/preview/features#bumblebee-unified-test-runner Android Studio now uses Gradle

    test runner https://developer.android.com/studio/preview/features#test-configurations 33 Unit Test Instrument Test Instrument Test using Gradle 4.2.1 Arctic Fox Bumblebee Android JUnit - IntelliJ Android instrumented test runner - Gradle test runner Gradle test runner Android instrumented 
 test runner on Gradle
  22. Emulator Snapshots for test failures 34 Test Emulator Snapshots for

    test failures https://developer.android.com/studio/preview/features#emulator-snapshots-for-test-failures Instrumented test పझ౟ पಁܳ ؊ ࡅܰѱ ੤അ
  23. 35 Emulator Snapshots for test failures on Android Studio োѾػ

    ীޯۨ੉ఠীࢲ प೯઺ੋ instrumented testо पಁೠ ா੉झܳ ߊѼೞݶ ӝӝ੄ पಁद ࢚ కܳ झշ ࢫਵ۽ ࢤࢿ - Android Studio Bumblebeeীࢲ 
 Android Gradle Plugin 7.0-alpha13 ੉࢚
  24. 36

  25. 37

  26. What is UTP? ా೤ పझ౟ ೒ۖಬ 
 (Unified Test Platform)

    ೒۞Ӓੋਸ ాೠ ݽٕध 42 ӝמ ѐߊীࢲ పझ౟ ജ҃ਸ ୶࢚ ചೞח ഛ੢ оמೠ ೒ۖಬ ݽٕഋ ೒۞Ӓੋਸ ా೧ పझ౟ प ೯ী ӝמ੉ ୶оغয ӝמਸ ة݀ ੸ਵ۽ ѐߊೞҊ সؘ੉౟ ೡ ࣻ ੓׮ ݽٚ పझ౟ ജ҃ী ؀೧ ೠ о૑ ߑधਵ۽݅ ҳഅೞݶ غח ݽٕध ѐߊ۽ ؊ ݆਷ ӝמਸ ؊ ࡈܻ ߓ ನೡ ࣻ ੓׮ ؊ ૣ਷ ܾܻૉ ઱ӝ
  27. 44 Gradle DSLਸ ࢎਊ೧ࢲ о࢚ ੢஖ ߂ ੢஖ 
 Ӓܛਸ

    ࢶ঱ оמ Android Gradle plugin(AGP)ਸ ా೧ ੢஖ܳ ੹੸ਵ۽(ࢤࢿ, ߓನ, ೧୓) ҙܻ ೙ਃೠ о࢚ ੢஖ ੉޷૑ ߂ SDKܳ ׮਍۽٘ పझ౟ Ѿҗܳ நयೞҊ Emulator snapshotਸ ࢎਊ೧ ࡅܰѱ పझ౟ оמ Gradle Managed Devices
  28. 45 android { testOptions { devices { pixel2api29(com.android.build.api.dsl.ManagedVi rt ualDevice)

    { // Android Studioীࢲ ࠅ ࣻ ੓ח ӝӝ ೐۽೙ ࢎਊ device = "Pixel 2" apiLevel = 29 // Google Play Servicesо ࠛ೙ਃೠ ҃਋ "aosp"۽ ૑੿ оמ systemImageSource = "google" abi = "x86" } } } } Gradle Managed Virtual Devices
  29. 46 android { testOptions { devices { pixel2api29(com.android.build.api.dsl.ManagedVi rt ualDevice)

    { // Android Studioীࢲ ࠅ ࣻ ੓ח ӝӝ ೐۽೙ ࢎਊ device = "Pixel 2" apiLevel = 29 // Google Play Servicesо ࠛ೙ਃೠ ҃਋ "aosp"۽ ૑੿ оמ systemImageSource = "google" abi = "x86" } } } } Gradle Managed Virtual Devices
  30. 47 android { testOptions { devices { pixel2api29(com.android.build.api.dsl.ManagedVi rt ualDevice)

    { // Android Studioীࢲ ࠅ ࣻ ੓ח ӝӝ ೐۽೙ ࢎਊ device = "Pixel 2" apiLevel = 29 // Google Play Servicesо ࠛ೙ਃೠ ҃਋ "aosp"۽ ૑੿ оמ systemImageSource = "google" abi = "x86" } } } } Gradle Managed Virtual Devices
  31. 48 $ gradlew -Pandroid.experimental.androidTest.useUni fi edTestPla tf orm=true [device-name][BuildVariant]AndroidTest పझ౟

    प೯ Gradle Managed Virtual Devices https://developer.android.com/studio/preview/features#get_started Example (MAC) $ ./gradlew -Pandroid.experimental.androidTest.useUni t f
  32. 49 android { testOptions { devices { pixel2api29(com.android.build.api.dsl.ManagedVi rt ualDevice)

    { … } pixel3api29(com.android.build.api.dsl.ManagedVi rt ualDevice) { … } } deviceGroups { phoneAndTablet { targetDevices.addAll(devices.pixel2api29, devices.pixel3api30) } } } } Gradle Managed Virtual Devices (Group)
  33. 50 $ gradlew -Pandroid.experimental.androidTest.useUni fi edTestPla tf orm=true [group-name]Group[BuildVariant]AndroidTest పझ౟

    प೯ Gradle Managed Virtual Devices https://developer.android.com/studio/preview/features#get_started Example (MAC) $ ./gradlew -Pandroid.experimental.androidTest.useUni t f
  34. 51

  35. 52

  36. 53 02 Android Studio Arctic Fox 01 Android Studio 4.2

    03 Android Studio Bumblebee 04 Design Tools 05 Summary
  37. 54

  38. 55

  39. 56 Animated Vector Drawable - Preview Animated Vector Drawable -

    Android Studio Bemblebee or Higher What’s new
  40. VirtualLayout : Flow Performance improvements MotionLayout 2.0 2.1 Constraints Flow

    improvements Carousel helper Rotation support / Gestures ViewTransitions Foldable 57 ConstraintLayout
  41. 60 Motion Effect - ੉ز ߑೱী ٮۄ ଵઑೞח ࠭ী ః

    ೐ۨ੐ਸ ੗زਵ۽ ୶о Motion helper ConstraintLayout - MotionEffect https://github.com/androidx/constraintlayout/wiki/MotionEffect
  42. 61 View Transitions - MotionLayout ղীࢲ ױੌ গפݫ੉࣌ਸ ഝࢿചೞח ࢜۽਍

    కӒ ੤ࢎਊ оמೠ ױੌ View Transitions ConstraintLayout 2.1 - ViewTransition https://github.com/androidx/constraintlayout/wiki/ViewTransition
  43. 63 02 Android Studio Arctic Fox 01 Android Studio 4.2

    03 Android Studio Bumblebee 04 Design Tools 05 Summary
  44. 64 Compose preview Live literals Compose animation preview Layout validation

    Layout inspector Accessibility test framework scanner Animated vector drawable preview Design Devices Productivity Android 12 emulator system WearOS paring Heart rate sensor Rollable & foldable emulator Google TV System images Emulator USB passthrough Rotary Controls Wireless ADB Android 12 lint checks Kotlin Coroutines debugger Snapshots for test failures Work manager inspector Test matrix Kotlin symbol processing Incremental gradle support for Kotlin Intellij 2020.3.1 android studio