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

"I/O Extended 2023 Seoul"에서 발표한 "What's new in Android development tools" 발표 자료입니다.

pluulove (노현석)

July 29, 2023
Tweet

More Decks by pluulove (노현석)

Other Decks in Programming

Transcript

  1. 2022.3.1 2023.1.1 Canary 14 01 02 03 2022.2.1 Patch 2

    Android Studio Flamingo Giraffe Hedgehog Stable Stable
  2. 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
  3. Package manifest tag Breaking change ~ namespace <manifest … package

    = “com.example.app”> R classes, BuildConfig applicationId = “com.example.app2” ? ?
  4. Namespace property Breaking change ~ namespace <manifest … package =

    “com.example.app”> namespace applicationId R classes, BuildConfig Merged to manifest
  5. Breaking change ~ build option default values AGP 8.0+ Breaking

    changes: build option default values : https://developer.android.com/build/releases/gradle-plugin#default-changes 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
  6. ӝࠄ ప݃ ੿ࠁ <!-- themes.xml --> <resources xmlns:tools="h tt p://schemas.android.com/tools">

    <style name="Base.Theme.MyApplication" parent="Theme.Material3.DayNight.NoActionBar"> <!-- Customize your light theme here. --> <!-- <item name="colorPrimary">@color/my_light_primary</item> --> </style> <style name="Theme.MyApplication" parent="Base.Theme.MyApplication" /> </resources>
  7. ӝࠄ ప݃ ੿ࠁ <!-- themes.xml --> <resources xmlns:tools="h tt p://schemas.android.com/tools">

    <style name="Base.Theme.MyApplication" parent="Theme.Material3.DayNight.NoActionBar"> <!-- Customize your light theme here. --> <!-- <item name="colorPrimary">@color/my_light_primary</item> --> </style> <style name="Theme.MyApplication" parent="Base.Theme.MyApplication" /> </resources>
  8. Build Analyzer task • ࠽٘ दрী ৔ೱਸ ޷஖ח ੘সী ؀ೠ

    ࢜܂ѱ ಴द • Taskܳ ஠పҊܻ߹۽ Ӓܛച • AGP 8.0 ੉࢚ ૑ਗ
  9. New settings plugin • ೐۽ં౟ ੹୓ী زੌೠ Android ࢸ੿ਸ ҳࢿ

    оמ • settings.gradle ౵ੌী ੓ח android blockਸ ࢎਊೞৈ ੿੄ • ૑ਗ оמೠ ೦ݾ਷ SettingsExtensionী ੿੄ 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 ... }
  10. Network Inspector • ੹୓ ఋ੐ۄੋী ؀ೠ ݽٚ ౟ې೗ ؘ੉ఠܳ ಴द

    • ߧਤܳ ࢶఖೞৈ ೧׼ ߧਤ੄ ౟ې೗݅ ࠁӝ Inspect network traffic with the Network Inspector : https://developer.android.com/studio/debug/network-profiler
  11. Network Inspector 
 traffic interception • ਽׹ ੿ࠁܳ о۽଻য ׮ܲ

    ਽׹ਵ۽ ߈ജೞח Rule ࢸ੿ оמ • Status Code/Header/Body ١ ૑ਗ Inspect network traffic with the Network Inspector : https://developer.android.com/studio/debug/network-profiler
  12. Live Edit Mode ૑ਗ • Live Editо ز੘ೞח ӝળ ୶о

    • Push Edits Manually • Push Edits Automatically Iterative code development : https://developer.android.com/jetpack/compose/tooling/iterative-development#live-edit
  13. App Quality Insights • ਋ࢶ ࣽਤо ֫਷ ޙઁܳ ਤೠ ࢜۽਍

    
 জ ಿ૕ ੋࢎ੉౟ ӝמ੉ بੑ • Crashlyticsী ࠁҊػ ޙઁܳ IDEীࢲ ഛੋ оמ • Close issues / Add Note ૑ਗ
  14. New UI preview • IntelliJ੄ ࢜۽਍ UI ప݃ • IDE

    ೙ࣻ ӝמী ૘઺ • Settings > Appearance & Behavior > New UI • Giraffe Canary 2 ੉࢚ࠗఠ ૑ਗ
  15. Android SDK Upgrade Assistant • IDEীࢲ targetSdkVersion ژח API Level

    
 সӒۨ੉٘ী ೙ਃೠ ױ҅ܳ ഛੋ оמ • ޙࢲܳ IDEী ૒੽ оઉয়޲۽ ࠳ۄ਋੷৬ IDEр੄ 
 ੹ജ੉ ઴যٞ • Tools > Android SDK Upgrade Assistant
  16. Support Gradle Version Catalogs • TOML ӝ߈ Gradle Version Catalogs

    ૑ਗ بੑ • Dependency/Pluginਸ ؊ औѱ ҙܻ оמ • ׮নೠ ݽٕীࢲ Dependencyܳ type-safeೞѱ ଵઑ migration : https://developer.android.com/build/migrate-to-catalogs
  17. Gradle Version Catalogs Sharing catalogs : https://docs.gradle.org/current/userguide/platforms.html#sec:sharing-catalogs [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" }
  18. Default Kotlin DSL ࠽٘ ҳࢿ • ࢜ ೐۽ં౟ח ࠽٘ ҳࢿী

    ӝࠄ੸ਵ۽ 
 Kotlin DSL(build.gradle.kts)ਸ ࢎਊ • ӝઓࠁ׮ ա਷ ҳޙ ъઑ ಴द, ௏٘ ৮ࢿ ߂ 
 ࢶ঱ ఐ࢝ migration : https://developer.android.com/build/migrate-to-kotlin-dsl
  19. Update Live Edit पदр সؘ੉౟ • Emulator ߂ पઁ ױ݈ী

    Composableਸ 
 पदрਵ۽ সؘ੉౟ • জਸ ׮द ߓನೞ૑ ঋҊب Composableਸ 
 ಞ૘ೞҊ प೯ ઺ੋ ٣߄੉झীࢲ UI ߸҃ ࢎ೦ਸ 
 ഛੋ оמ
  20. ؊ ա਷ 
 Compose Animation Preview • updateTransition ߂ AnimatedVisibility

    ૑ਗ • ୶о۽ animate*AsState, CrossFade, rememberInfiniteTransition ߂ AnimatedContent ૑ਗ • ࢚కܳ ࢸ੿ೞৈ গפݫ੉࣌ ٣ߡӦ оמ
  21. target API level݅ 
 ࠽٘ೞח ୭੸ച ࠺ഝࢿച • (ӝࠄ) ੹୓

    ࠽٘ दрਸ ઴੉ӝ ਤ೧ ߓನೞ۰ח 
 ٣߄੉झ੄ API levelী ݏѱ dexing processܳ ઑ੿ • File > Settings > Experimental (Android Studio > Settings > Experimental on macOS)ীࢲ “Optimize build for target device API level only” ୓௼೧ઁ
  22. JDK ҃۽ܳ ૑੿ೞח ࢜۽਍ ݒ௼۽ • Gradle ؘހ प೯ী ࢎਊغח

    Java Home Path (=GRADLE_LOCAL_JAVA_HOME) • नӏ ೐۽ં౟ח ӝࠄ੸ਵ۽ GRADLE_LOCAL_JAVA_HOMEਸ ࢎਊ • Preferences | Build, Execution, Deployment | Build Tools | Gradle ীࢲ 
 ࢸ੿ оמ
  23. • Android Studio IDEী ా೤ػ ୁࠈ ഋక • LLM(؀ӏݽ ঱য

    ݽ؛)۽ ೟णػ ؘ੉ఠ ӝ߈ ز੘ • ௏٘ܳ ࢤࢿೞҊ, ҙ۲ ܻࣗझܳ ଺Ҋ, ݽߧ ࢎ۹ܳ ߓ਋Ҋ, दрਸ ੺ডೞח ؘ ب਑ਸ ષ • അ੤ प೷ ߡ੹. ޷Ҵ ೠ੿ਵ۽ ࢎਊ оמ Studio Bot
  24. 51 Stable : 1.4.3 Beta : 1.5.0-rc01 Alpha : 1.6.0-alpha02

    Q. Compose ୭न ߡ੹ ੿ഛب!… ই૒?!
  25. 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
  26. Compose state information in Debugger • Composaਸ ੌद ઺૑ೞݶ ٣ߡѢীࢲ

    
 ౵ۄ޷ఠ੄ ߸҃ ৈࠗܳ ഛੋ оמ • ੤ҳࢿ੄ ਗੋਸ ࠁ׮ ബਯ੸ਵ۽ ઑࢎоמ
  27. Version control system integration in App Quality Insights VCSܳ ࢎਊೞ۰ݶ

    gradle.properties ౵ੌীࢲ android.enableVcsInfo ೒ېӒܳ ഝࢿച ೙ਃ # gradle.prope rt ies android.enableVcsInfo=true
  28. Gradle Managed Devices 
 Firebase Test Lab devices plugins {

    ... id "com.google. fi rebase.testlab" } // Gradle੉ জ పझ౟ী ࢎਊೡ Firebase Test Lab ӝӝܳ ૑੿ fi rebaseTestLab { managedDevices { create(" ft lDevice") { device = "Pixel3" apiLevel = 30 } } ...
  29. Gradle Managed Devices 
 Firebase Test Lab devices fi rebaseTestLab

    { managedDevices { create("GalaxyS23Ultra") { ... } create("GalaxyZFlip3") { ... } create("GalaxyZFold3") { ... } create("GalaxyTabS2") { ... } } }
  30. Gradle Managed Devices 
 Firebase Test Lab devices fi rebaseTestLab

    { managedDevices { groups { samsungGalaxy { targetDevices.add(devices.GalaxyS23Ultra) targetDevices.add(devices.GalaxyZFlip3) targetDevices.add(devices.GalaxyZFold3) targetDevices.add(devices.GalaxyTabS3) } } } } $ ./gradlew group-nameGroupBuildVariantAndroidTest
  31. 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 New 
 settings plugin App Quality Insights
  32. 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
  33. Studio Bot Hedgehog Espresso Device API 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 Compose Multiple previews Gradle Managed Devices with Firebase Test Lab