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

What's new in 
Android development tools

What's new in 
Android development tools

"인공지능위크 2023"에서 발표한 "Android 개발도구 최신 기능 업데이트" 발표 자료입니다.

pluulove (노현석)

July 14, 2023
Tweet

More Decks by pluulove (노현석)

Other Decks in Programming

Transcript

  1. What's new in

    Android development tools
    Hyeonseok Noh,

    Google Developer Experts for Android

    KakaoBank

    View Slide

  2. Android Studio

    View Slide

  3. History

    View Slide

  4. Flamingo

    2022.2.1.20
    Year of

    IntelliJ version
    IntelliJ

    major

    version
    Studio

    major

    version
    IntelliJ Platform version
    Studio

    minor/patch

    version
    New version rule

    Arctic Fox+

    View Slide

  5. Hedgehog

    2023.1.1 Canary 12
    Giraffe

    2022.3.1 RC 01
    Flamingo

    2022.2.1 Patch 2
    Agenda
    Last checked : 2023.07.12

    View Slide

  6. Android Studio

    Flamingo

    2022.2.1 Patch 2

    View Slide

  7. Live Edit

    for Compose
    IntelliJ IDEA
    2022.2
    Device
    mirroring
    Theme

    Dynamic color
    Network
    Inspector
    Flamingo
    Compose
    Tracing
    Updates to
    project
    templates
    Build
    Analyzer
    task
    JDK 17

    bundled
    App Quality Insights
    New

    settings plugin

    View Slide

  8. • ӝࠄ Material Design 3ਸ ੸ਊ

    • Compose Projectо ݢ੷ ߓ஖
    Project templates

    View Slide





  9. <br/><br/><!-- Customize your light theme here. --><br/><br/><!-- <item name="colorPrimary">@color/my_light_primary</item> --><br/><br/>




    ӝࠄ ప݃ ੿ࠁ

    View Slide





  10. <br/><br/><!-- Customize your light theme here. --><br/><br/><!-- <item name="colorPrimary">@color/my_light_primary</item> --><br/><br/>




    ӝࠄ ప݃ ੿ࠁ

    View Slide

  11. Breaking change ~ namespace

    AGP 8.0+
    // build.gradle.kts

    android {

    namespace = "com.example.myapp"

    testNamespace = "com.example.mytestapp"

    ...

    }
    Configure the app module : https://developer.android.com/build/configure-app-module

    View Slide

  12. Package manifest tag

    Breaking change ~ namespace

    R classes,

    BuildConfig
    R classes,

    BuildConfig
    R classes,

    BuildConfig
    applicationId = “com.example.app2”
    ?
    ?

    View Slide

  13. Namespace property

    Breaking change ~ namespace
    “com.example.app”>
    namespace applicationId
    R classes,

    BuildConfig
    R classes,

    BuildConfig
    R classes,

    BuildConfig
    Merged to manifest

    View Slide

  14. Breaking change ~ build option default values

    AGP 8.0+
    Flag
    New

    default value
    Previous

    default value
    android.defaults.

    buildfeatures.buildconfig
    FALSE TRUE
    android.defaults.

    buildfeatures.aidl
    FALSE TRUE
    android.defaults.

    buildfeatures.renderscript
    FALSE TRUE
    android.nonFinalResIds TRUE FALSE
    android.nonTransitiveRClass TRUE FALSE
    android.enableR8.fullMode TRUE FALSE
    Breaking changes: build option default values : https://developer.android.com/build/releases/gradle-plugin#default-changes

    View Slide

  15. Placeholder text. Please replace. A class is
    like a blueprint, which contains instructions
    for how to create something.


    An object instance is an actual Dice that’s
    created from the blueprint.
    - ੹୓ ఋ੐ۄੋী ؀ೠ ݽٚ ౟ې೗ ؘ੉ఠܳ ಴द

    - ߧਤܳ ࢶఖೞৈ ೧׼ ߧਤ੄ ౟ې೗݅ ࠁӝ
    Network Inspector
    Inspect network traffic with the Network Inspector : https://developer.android.com/studio/debug/network-profiler

    View Slide

  16. Placeholder text. Please replace. A class is
    like a blueprint, which contains instructions
    for how to create something.


    An object instance is an actual Dice that’s
    created from the blueprint.
    - ਽׹ ੿ࠁܳ о۽଻য ׮ܲ ਽׹ਵ۽ ߈ജೞח Rule
    ࢸ੿ оמ

    - Status Code/Header/Body ١ ૑ਗ
    Network Inspector

    traffic interception

    View Slide

  17. View Slide

  18. Themed app icons ޷ܻ ࠁӝ ૑ਗ

    View Slide

  19. Dynamic color ޷ܻࠁӝ ૑ਗ

    View Slide

  20. Dynamic color ޷ܻࠁӝ ૑ਗ

    View Slide

  21. - File > Settings > Tools

    > Device Mirroring
    Device mirroring

    View Slide

  22. Device mirroring

    View Slide

  23. Layout Inspector

    View Slide

  24. Live Edit for Compose

    View Slide

  25. Live Editо ز੘ೞח ӝળ ୶о

    • Push Edits Manually

    • Push Edits Automatically
    Live Edit Mode ૑ਗ
    Iterative code development : https://developer.android.com/jetpack/compose/tooling/iterative-development#live-edit

    View Slide

  26. Compose Tracing

    View Slide

  27. Compose Tracing

    View Slide

  28. View Slide

  29. • ਋ࢶ ࣽਤо ֫਷ ޙઁܳ ਤೠ

    ࢜۽਍ জ ಿ૕ ੋࢎ੉౟ ӝמ੉ بੑ

    • Crashlyticsী ࠁҊػ ޙઁܳ IDEীࢲ
    ഛੋ оמ

    • Close issues / Add Note ૑ਗ
    App Quality Insights

    View Slide

  30. View Slide

  31. • ࠽٘ दрী ৔ೱਸ ޷஖ח ੘সী
    ؀ೠ ࢜܂ѱ ಴द

    • Taskܳ ஠పҊܻ߹۽ Ӓܛച

    • AGP 8.0 ੉࢚ ૑ਗ
    Build Analyzer task

    View Slide

  32. New settings plugin : https://developer.android.com/build/releases/gradle-plugin#settings-plugin

    SettingsExtension : https://developer.android.com/reference/tools/gradle-api/8.0/com/android/build/api/dsl/SettingsExtension
    apply plugin 'com.android.se
    tt
    ings'

    android {

    compileSdk 33

    minSdk 28

    ...

    }
    • ೐۽ં౟ ੹୓ী زੌೠ Android ࢸ੿੉ ҳࢿ оמ೧૗

    • settings.gradle ౵ੌী ੓ח android blockਸ ࢎਊೞৈ
    ੿੄

    • ૑ਗ оמೠ ೦ݾ਷ SettingsExtension ী ੿੄
    New settings plugin

    View Slide

  33. app/build.gradle
    settings.gradle
    AndroidManifest.xml

    View Slide

  34. Android Studio

    Giraffe

    2022.3.1 RC 01

    View Slide

  35. Kotlin DSL
    Device
    Explorer
    New Android SDK

    Upgrade Assistant
    Giraffe
    New UI
    Animation Preview

    Jetpack Compose
    Lint contains bytecode
    targeting JVM 17
    Make
    selected
    modules
    Gradle Version
    Catalog
    Download Import
    in Build Analyzer
    Support for
    Grammatical
    Inflection API
    Per-app language
    preferences support

    View Slide

  36. • IntelliJ੄ ࢜۽਍ UI ప݃

    • IDE ೙ࣻ ӝמী ૘઺

    • Settings > Appearance & Behavior
    > New UI

    • Giraffe Canary 2 ੉࢚ࠗఠ ૑ਗ
    New UI preview
    New UI : https://www.jetbrains.com/help/idea/new-ui.html

    View Slide

  37. Light
    Dark
    High contrast
    IntelliJ Light
    Darcula
    Theme

    View Slide

  38. • Emulator ߂ पઁ ױ݈ী Composableਸ
    पदрਵ۽ সؘ੉౟

    • জਸ ׮द ߓನೞ૑ ঋҊب Composableਸ
    ಞ૘ೞҊ प೯ ઺ੋ ٣߄੉झীࢲ UI ߸҃ ࢎ
    ೦ਸ ഛੋ оמ
    Update

    Live Edit पदр সؘ੉౟

    View Slide

  39. पदр Composable Update

    View Slide

  40. ؊ ա਷

    Compose Animation Preview
    • updateTransition ߂ AnimatedVisibility ૑ਗ

    • ୶о۽ animate*AsState, CrossFade,
    rememberInfiniteTransition ߂ AnimatedContent ૑ਗ

    • ࢚కܳ ࢸ੿ೞৈ গפݫ੉࣌ ٣ߡӦ оמ

    View Slide

  41. Android SDK Upgrade Assistant
    • IDEীࢲ targetSdkVersion ژח API Level সӒۨ੉٘ী
    ೙ਃೠ ױ҅ܳ ഛੋ оמ

    • ޙࢲܳ IDEী ૒੽ оઉয়޲۽ ࠳ۄ਋੷৬ IDEр੄ ੹ജ੉

    ઴যٞ

    • Tools > Android SDK Upgrade Assistant

    View Slide

  42. View Slide

  43. Default

    Kotlin DSL ࠽٘ ҳࢿ
    • ࢜ ೐۽ં౟ח ࠽٘ ҳࢿী ӝࠄ੸ਵ۽

    Kotlin DSL(build.gradle.kts)ਸ ࢎਊ

    • ӝઓࠁ׮ ա਷ ҳޙ ъઑ ಴द, ௏٘ ৮ࢿ ߂

    ࢶ঱ ఐ࢝
    migration : https://developer.android.com/build/migrate-to-kotlin-dsl

    View Slide

  44. Support

    Gradle Version Catalogs
    • TOML ӝ߈ Gradle Version Catalogs

    ૑ਗ بੑ

    • Dependency/Pluginਸ ؊ औѱ ҙܻ оמ

    • ׮নೠ ݽٕীࢲ Dependencyܳ

    type-safeೞѱ ଵઑ
    migration : https://developer.android.com/build/migrate-to-catalogs

    View Slide

  45. [versions]

    androidGradlePlugin = "8.1.0-rc01"

    androidxActivity = "1.7.0"

    androidxAppCompat = "1.5.1"

    [libraries]

    androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidxActivity" }

    androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppCompat" }

    [bundles]

    androidX-compose = [ "androidx-activity-compose", "…" ]

    [plugins]

    android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
    Gradle Version Catalogs
    Sharing catalogs : https://docs.gradle.org/current/userguide/platforms.html#sec:sharing-catalogs

    View Slide

  46. Code completion and navigation

    View Slide

  47. Download info during sync

    View Slide

  48. target API level݅ ࠽٘ೞח ୭੸ച ࠺ഝࢿച
    • (ӝࠄ) ੹୓ ࠽٘ दрਸ ઴੉ӝ ਤ೧ ߓನೞ۰
    ח ٣߄੉झ੄ API levelী ݏѱ dexing
    processܳ ઑ੿

    • File > Settings > Experimental (Android
    Studio > Settings > Experimental on
    macOS)ীࢲ “Optimize build for target
    device API level only” ୓௼೧ઁ

    View Slide

  49. Android Studio

    Hedgehog

    2023.1.1 Canary 12

    View Slide

  50. Hedgehog
    Espresso
    Device API
    Studio Bot
    Safe Mode

    Android
    Studio
    Baseline Profiles
    module wizard
    Compose state
    information

    in debugger
    App Quality Insights
    Analyze

    Android vitals
    Version control
    system integration
    Embedded Layout
    Inspector
    New macro to
    specify JDK path
    Gradle Managed
    Devices

    with Firebase Test Lab

    View Slide

  51. JDK ҃۽ܳ ૑੿ೞח ࢜۽਍ ݒ௼۽
    • Gradle ؘހ प೯ী ࢎਊغח Java Home
    Path (=GRADLE_LOCAL_JAVA_HOME)

    • नӏ ೐۽ં౟ח ӝࠄ੸ਵ۽
    GRADLE_LOCAL_JAVA_HOMEਸ ࢎਊ

    • Preferences | Build, Execution,
    Deployment | Build Tools | Gradle ীࢲ

    ࢸ੿ оמ

    View Slide

  52. View Slide

  53. Studio Bot
    • Android Studio IDEী ా೤ػ ୁࠈ ഋక

    • LLM(؀ӏݽ ঱য ݽ؛)۽ ೟णػ ؘ੉ఠ ӝ߈ ز੘

    • ௏٘ܳ ࢤࢿೞҊ, ҙ۲ ܻࣗझܳ ଺Ҋ, ݽߧ ࢎ۹ܳ
    ߓ਋Ҋ, दрਸ ੺ডೞח ؘ ب਑ਸ ષ

    • അ੤ प೷ ߡ੹. ޷Ҵ ೠ੿ਵ۽ ࢎਊ оמ

    View Slide

  54. Sample

    View Slide

  55. Sample

    View Slide

  56. Studio Bot਷ ୡӝ प೷ ױ҅

    ೐۽ં౟ী Hilt ୶о

    View Slide

  57. Embedded Layout Inspector
    • Running Devicesীࢲ

    Layout Inspector प೯ оמ

    • Preferences > Experimental >
    Layout Inspectorীࢲ
    Embedded Layout Inspector

    ഝࢿച оמ

    • Hedgehog Canary 2 ੉࢚ ૑ਗ
    Embedded Layout Inspector : https://developer.android.com/studio/preview/features?utm_source=android-studio#embedded-layout-inspector

    View Slide

  58. Embedded Layout Inspector

    View Slide

  59. Debuggerীࢲ Compose state information
    • Composaਸ ੌद ઺૑ೞݶ ٣ߡѢীࢲ

    ౵ۄ޷ఠ੄ ߸҃ ৈࠗܳ ഛੋ оמ

    • ੤ҳࢿ੄ ਗੋਸ ࠁ׮ ബਯ੸ਵ۽ ઑࢎ
    оמ

    View Slide

  60. View Slide

  61. Baseline Profiles module wizard
    File > New > New Module

    View Slide

  62. Baseline Profiles module wizard

    View Slide

  63. View Slide

  64. View Slide

  65. View Slide

  66. App Quality Insights + Android Visuals

    View Slide

  67. View Slide

  68. View Slide

  69. # gradle.prope
    rt
    ies

    android.enableVcsInfo=true
    Version control system integration

    in App Quality Insights
    • VCSܳ ࢎਊೞ۰ݶ gradle.properties ౵ੌীࢲ
    android.enableVcsInfo ೒ېӒܳ ഝࢿച ೙ਃ

    View Slide

  70. Firebase Test Lab
    Firebase Test Lab : https://firebase.google.com/docs/test-lab

    View Slide

  71. plugins {

    ...

    id "com.google.
    fi
    rebase.testlab"

    }

    // Gradle੉ জ పझ౟ী ࢎਊೡ Firebase Test Lab ӝӝܳ ૑੿

    fi
    rebaseTestLab {

    managedDevices {

    create("
    ft
    lDevice") {

    device = "Pixel3"

    apiLevel = 30

    }

    }

    ...

    }
    Gradle Managed Devices

    Firebase Test Lab devices

    View Slide

  72. Gradle Managed Devices

    Firebase Test Lab devices
    fi
    rebaseTestLab {

    managedDevices {

    create("GalaxyS23Ultra") { ... }

    create("GalaxyZFlip3") { ... }

    create("GalaxyZFold3") { ... }

    create("GalaxyTabS2") { ... }

    }

    }

    View Slide

  73. $ ./gradlew group-nameGroupBuildVariantAndroidTest
    fi
    rebaseTestLab {

    managedDevices {

    groups {

    samsungGalaxy {

    targetDevices.add(devices.GalaxyS23Ultra)

    targetDevices.add(devices.GalaxyZFlip3)

    targetDevices.add(devices.GalaxyZFold3)

    targetDevices.add(devices.GalaxyTabS3)

    }

    }

    }

    }
    Gradle Managed Devices

    Firebase Test Lab devices

    View Slide

  74. Device Explorer

    New UI (Opt-in)

    Kotlin DSL & Version Catalog Build

    Per-app language preferences support

    Live Edit for Jetpack Compose

    Download Import in Build Analyzer

    Jetpack Compose Animation Preview
    Giraffe
    Studio Bot

    App Quality Insights + Android Visuals

    Embedded Layout Inspector

    Compose state information

    New macro to specify JDK path
    Hedgehog+
    g.co/androidstudio/preview

    View Slide

  75. Thank you

    View Slide