Share
Embed
What's new in Android Develop
Google IO Extended 2021 Korea Android에서 발표한 "What's new in Android Develop" 입니다
pluulove (노현석)
July 03, 2021
Transcript
65 slides
-
Reference 2 What’s new in Android development tools What's new
in Android testing tools New in design tools -
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 -
4 02 Android Studio Arctic Fox 01 Android Studio 4.2
03 Android Studio Bumblebee 04 Design Tools 05 Summary -
Android Studio 4.2ࠗఠ JDK 11 Studio৬ ೣԋ ߣٜ۽ ઁҕ Gradle
ഐജࢿ ߂ ജ҃ ߸҃ Configuration 5 -
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 -
- 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 -
8 Android Studio Bundle in Open JDK Run Android Studio
Run Gradle Task Installed Android Studio -
Installed Android Studio 9 Android Studio Bundle in Open JDK
Run Android Studio Run Gradle Task Project Structure -
10 02 Android Studio Arctic Fox 01 Android Studio 4.2
03 Android Studio Bumblebee 04 Design Tools 05 Summary -
11 2020.3.1 Arctic Fox Year of Intellij Version Intellij Major
version Studio Major version IntelliJ Platform version -
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 -
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 -
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ਸ ࢎਊೞৈ ױਤ పझܳ प೯ -
New test matrix for multi-device testing 22 Test Instrumented testܳ
ৈ۞ ӝӝীࢲ ߽۳۽ प೯ పझ Ѿҗ ಁօਸ ࢎਊೞৈ API ࣻળ ژח ೞ٘ਝয ࣘࢿਵ۽ ੋ೧ పझо पಁೞח ഛੋ -
27 02 Android Studio Arctic Fox 01 Android Studio 4.2
03 Android Studio Bumblebee 04 Design Tools 05 Summary -
28 2021.1.1 Bumblebee Year of Intellij Version Intellij Major version
Studio Major version -
Unified Gradle test runner 29 Test Instrumented testܳ प೯ೡ ٸ
Gradle Android Instrumented test runnerܳ ా೧ࢲ प೯ -
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ܳ ࢎਊ -
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 -
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 పझ पಁܳ ؊ ࡅܰѱ അ -
35 Emulator Snapshots for test failures on Android Studio োѾػ
ীޯۨఠীࢲ प೯ੋ instrumented testо पಁೠ ாझܳ ߊѼೞݶ ӝӝ पಁद ࢚ కܳ झշ ࢫਵ۽ ࢤࢿ - Android Studio Bumblebeeীࢲ Android Gradle Plugin 7.0-alpha13 ࢚ -
39 Linux or Mac : ./gradlew connectedCheck Windows : gradlew
connectedCheck -
40 Linux or Mac : ./gradlew connectedCheck Windows : gradlew
connectedCheck -
What is UTP? ా పझ ۖಬ (Unified Test Platform)
۞Ӓੋਸ ాೠ ݽٕध 42 ӝמ ѐߊীࢲ పझ ജ҃ਸ ୶࢚ ചೞח ഛ оמೠ ۖಬ ݽٕഋ ۞Ӓੋਸ ా೧ పझ प ೯ী ӝמ ୶оغয ӝמਸ ة݀ ਵ۽ ѐߊೞҊ সؘ ೡ ࣻ ݽٚ పझ ജ҃ী ೧ ೠ о ߑधਵ۽݅ ҳഅೞݶ غח ݽٕध ѐߊ۽ ؊ ݆ ӝמਸ ؊ ࡈܻ ߓ ನೡ ࣻ ؊ ૣ ܾܻૉ ӝ -
44 Gradle DSLਸ ࢎਊ೧ࢲ о࢚ ߂ Ӓܛਸ
ࢶ оמ Android Gradle plugin(AGP)ਸ ా೧ ܳ ਵ۽(ࢤࢿ, ߓನ, ೧) ҙܻ ਃೠ о࢚ ߂ SDKܳ ۽٘ పझ Ѿҗܳ நयೞҊ Emulator snapshotਸ ࢎਊ೧ ࡅܰѱ పझ оמ Gradle Managed Devices -
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 -
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 -
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 -
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 -
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) -
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 -
53 02 Android Studio Arctic Fox 01 Android Studio 4.2
03 Android Studio Bumblebee 04 Design Tools 05 Summary -
56 Animated Vector Drawable - Preview Animated Vector Drawable -
Android Studio Bemblebee or Higher What’s new -
VirtualLayout : Flow Performance improvements MotionLayout 2.0 2.1 Constraints Flow
improvements Carousel helper Rotation support / Gestures ViewTransitions Foldable 57 ConstraintLayout -
60 Motion Effect - ز ߑೱী ٮۄ ଵઑೞח ࠭ী ః
ۨਸ زਵ۽ ୶о Motion helper ConstraintLayout - MotionEffect https://github.com/androidx/constraintlayout/wiki/MotionEffect -
61 View Transitions - MotionLayout ղীࢲ ױੌ গפݫ࣌ਸ ഝࢿചೞח ࢜۽
కӒ ࢎਊ оמೠ ױੌ View Transitions ConstraintLayout 2.1 - ViewTransition https://github.com/androidx/constraintlayout/wiki/ViewTransition -
63 02 Android Studio Arctic Fox 01 Android Studio 4.2
03 Android Studio Bumblebee 04 Design Tools 05 Summary -
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