Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
New in Android Studio
Search
pluulove (노현석)
December 21, 2019
Programming
0
1.2k
New in Android Studio
Android Dev Summit 2019 extended Seoul에서 발표한 자료입니다.
pluulove (노현석)
December 21, 2019
Tweet
Share
More Decks by pluulove (노현석)
See All by pluulove (노현석)
안드로이드 기술 이력서의 최소 조건
pluu
1
1.8k
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
510
Android Studio와 좀 더 친해지기
pluu
0
110
우리모두 삽질한다
pluu
0
1.3k
Re:Android Studio 설정 살펴보기 및 생산성 올리기
pluu
0
1.5k
What's new in Android development tools
pluu
1
830
What's new in Android development tools
pluu
1
410
개발자 Side Next Step ~ 커뮤니티 x Android
pluu
2
240
Modern Android Developer ~ 안내서
pluu
1
3k
Other Decks in Programming
See All in Programming
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Ethereum_.pdf
nekomatu
0
460
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
120
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
最新TCAキャッチアップ
0si43
0
140
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Typedesign – Prime Four
hannesfritz
40
2.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Code Reviewing Like a Champion
maltzj
520
39k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
It's Worth the Effort
3n
183
27k
YesSQL, Process and Tooling at Scale
rocio
169
14k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Transcript
Android Dev Summit 2019 extended Seoul New in Android Studio
GDE for Android GDG Korea Android Organizer HyeonSeok.Noh
উ֞ೞࣁਃ pluuੑפ Android App Developer Google Developers Expert GDG Korea
Android Organizer
Android Auto Emulator Emulator Multi-Display support Google Maps Emulator Integration
Design Tools : Split View & Zoom Control View Binding Support Profilers: Leak detection Filtering JNI support for Kotlin APK Reloader Intellij 2019.2 v3.6 Jetpack Compose Support Motion Editor Build Attribution Desugaring in D8 & R8 Design Tools : Multi-Preview Updated Layout Inspector Kotlin DSL script (KTS) Proguard Editing Kotlin Live Templates Intellij 2019.3 v4.0+
Android Dev Summit 2019 extended Seoul Project Structure v3.6 /
v4.0
build.gradle (~v3.6) New Versions
build.gradle (~v3.6) New Versions (Not Visible)
build.gradle (v4.0) Solved problem new version
build.gradle Variable / Dependency
Android Dev Summit 2019 extended Seoul Build Speed v4.0 Canary
3+
None
Build Speed • Build ࠙ࢳद Build Task Critical Pathܳ ӝળਵ۽
ഛੋ • Critical Path : Gradle োࣘਵ۽ प೯ • ਃ ҃۽о Build दрਸ Ѿ • 4.0.0-alpha03 ࢚ ਃ
Build Speed Click
Build Speed 40.7%
Build Speed
Build Speed
Build Speed
Build Speed
Build Speed
Build Speed
Build Speed
Build Speed
Incremental Build Speed First Build (Total 127.233 s) Second Build
(Total 7.129 s) 48.394 s 5.598 s
Android Dev Summit 2019 extended Seoul Multi Preview v3.6 /
v4.0
Multi Preview • নೠ ٣߄झ ߂ Configuration җ ҙ۲ػ ۨইਓਸ
زदী ܻ ࠅ ࣻ ח ٣ੋ بҳ • Pixel Devices • Locale • Color Blind Mode • IDE ହ য়ܲଃ ࢚ױীח Multi Preview చਸ ܼೞৈ ഝࢿച
Split View Code / Split / Design
Multi Preview Click
Pixel Devices Click
Project Locales Click
Color Blind Mode Click
Android Dev Summit 2019 extended Seoul Desugaring v4.0
Android ѐߊद Ҋ • Java? Kotlin? • ӝמ ࢎਊೡ
ࣻ חо? • ݽٚ ۽Ӓې߁ীࢲ minSdkVersionী ח ޙઁٜ • Shadow / ShadowColor / Java 8 Retrolambda, jack, desugar, Kotlin
~ Android Studio 3.x • Android Studio 3.0 ࢚ DEX
Compiler D8ীࢲ desugaring ۽ࣁझܳ ా೧ Java 8 য ӝמ ਗ • lambda expressions • default interface methods • try with resources • Java 8ਸ ॶ ࣻ ݅, ৈ ୭ ߡ ઁড ઓ Desugaring https://developer.android.com/studio/write/java8-support
~ Android Studio 3.x Desugaring
Desugaring Need High API Level
Android Studio 4.0+ • ୭ࣗ API Levelਸ ਃҳೞ ঋҊ Java
8 API ࢎਊ оמ • D8 ־ۅػ API ҳഅਸ ߹ب Library DEX ੌ۽ ஹੌ • Library ղࠗী ־ۅػ API ҳഅ ನೣ • Desugaring ۽ࣁझח Runtimeद Libraryܳ ࢎਊೞب۾ ٘ ࢿ Desugaring https://developer.android.com/studio/preview/features#j8-desugar
Desugaring // build.gradle android { compileOptions { // ࢜۽ Language
APIܳ ਗೞӝ ਤೠ Flag coreLibraryDesugaringEnabled true // Java compatibility ࢸী Java 8 ਊ sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }
Desugaring coreLibraryDesugaringEnabled
Default
Default
Desugaring ਊૐо
Desugaring
Supported API • java.util.stream • java.time • java.util.function • java.util.{Map,Collection,Comparator}
• java.util.Optional, java.util.OptionalInt, java.util.OptionalDouble • java.util.concurrent.atomic (new methods on AtomicInteger, AtomicLong, AtomicReference) • ConcurrentHashMap (with bug fixes for Android 5.0) Desugaring https://developer.android.com/studio/preview/features#j8-desugar
Android Dev Summit 2019 extended Seoul View Binding v3.6 /
v4.0
View Binding • View৬ ࢚ഐਊೞח ٘ܳ औѱ ࢿ • ViewBinding
ഝࢿചद XML Layout Binding ېझ ࢤࢿ • ࠗ࠙ ҃, findViewByIdܳ • Android Studio 3.6 Canary 11+ ࠗఠ ഝࢿച <!-- ignore --> <LinearLayout ... tools:viewBindingIgnore="true" > ... </LinearLayout>
View Binding // build.gradle android { viewBinding { isEnabled =
true } }
Example // result_profile.xml <LinearLayout ... > <TextView android:id="@+id/name" /> <ImageView
android:cropToPadding="true" /> <Button android:id="@+id/button" android:background="@drawable/rounded_button" /> </LinearLayout>
Example // result_profile.xml <LinearLayout ... > <TextView android:id="@+id/name" /> <ImageView
android:cropToPadding="true" /> <Button android:id="@+id/button" android:background="@drawable/rounded_button" /> </LinearLayout> public final class ResultProfileBinding implements ViewBinding { @NonNull private final LinearLayout rootView; @NonNull public final Button button; @NonNull public final TextView name; private ResultProfileBinding( @NonNull LinearLayout rootView, @NonNull Button button, @NonNull TextView name) { this.rootView = rootView; this.button = button; this.name = name; } @Override @NonNull public LinearLayout getRoot() { return rootView; } @NonNull public static ResultProfileBinding inflate(...) { ... }
View Binding • Binding ېझ ੋझఢझী Viewী ೠ ଵઑо ನೣ
• Root • IDо ח View public final class ResultProfileBinding implements ViewBinding { @NonNull private final LinearLayout rootView; @NonNull public final Button button; @NonNull public final TextView name; private ResultProfileBinding( @NonNull LinearLayout rootView, @NonNull Button button, @NonNull TextView name) { this.rootView = rootView; this.button = button; this.name = name; } @Override @NonNull public LinearLayout getRoot() { return rootView; } @NonNull public static ResultProfileBinding inflate(...) { ... }
View Binding private lateinit var binding: ResultProfileBinding @Override fun onCreate(savedInstanceState:
Bundle) { super.onCreate(savedInstanceState) binding = ResultProfileBinding.inflate(layoutInflater) setContentView(binding.root) } DataBindingҗ زੌೠ ࢎਊߨ
findViewById৬ ର • Null safety : Viewী ೠ ଵઑܳ
ࢤࢿ • ੜޅػ View ID۽ ੋೠ NPE ߊࢤ ۰ח হ • ੌࠗ࠙ী݅ ח ҃ @Nullable • Type safety : XMLীࢲ View Typeҗ ੌ • Layoutҗ ٘ ࠺ഐജࢿਵ۽ ੋ೧ Compileदী ࠽٘о पಁ
• Data Binding <layout> కӒܳ ࢎਊೠ ۨইਓ݅ ܻ • View
Binding ۨইਓ ߸ࣻ/അध ਗ • XML ؘఠ৬ ۨইਓ ߄ੋ٬ ࠛоמ • ࢎਊ ؊ औҊ ࠽٘ ࣘبী ؏ ೱਸ ષ Data Bindingҗ ର
Android Dev Summit 2019 extended Seoul Jetpack Compose v4.0
Before & after Simple app that filters contacts and display
name + photo
None
@Composable fun FilteredList(contacts: List<Contact>, filterText: String = "") { val
state = +state { filterText } VerticalScroller { Column { TextField(filterText, onValueChange = { state.value = it }) contacts.filter { it.contains(state.value) }.forEach { Row { Image(it.photo) Text(it.name) } } } } } Compose Version
None
None
None
Jetpack Compose • pre alpha version • API Not Fixed
Android Dev Summit 2019 extended Seoul Embed Emulator on Android
Studio NOT RELEASE
Embed Emulator
Android Dev Summit 2019 extended Seoul Editor v4.0
NOT RELEASE
Android Dev Summit 2019 extended Seoul Editor ~ Debugging v3.6
/ v4.0
Debugging ~ Problem • ٣ߡӦ Break Point ۄੋਸ աஜ
• ٣ߡӦ ୶о٘ܳ ؊ ֍Ҋ रয ೧Ѿߨ 1. ನӝೠ 2. द दೠ 3. Apply Changesܳ दبೠ
Apply Changes & Frame Drop Apply Changes & Frame Drop
Android Dev Summit 2019 extended Seoul Layout Inspector v4.0
• I/O 19ীࢲ ࣗѐػ ә • ࢜۽ Layout Inspector
• AS 4.0 Canary 4ীࢲ ز • AS 4.0 Canary 5ীࢲ ز • AS 4.0 Canary 6ীࢲ ز Layout Inspector
• Preference - Experimental - Layout Inspector - Enable Live
Layout Inspector • Install Plugin • Skia Layout Inspector Enable
• Skia Parser Server Requirement
None
None
None
None
None
None
None
None
None
• 3D View ഋక۽ ۨইਓ Өܳ द пਵ۽ ഛੋ оמ
• അ Live updates Slooooow Reviews
Motion Editor v4.0
None
None
None
None
None
None
None
Custom
Kotlin Live Template v4.0
Live Template
Emulator
Displays Apply Changes Add Display
Multiple Display
New Old Emulator 29.2.2 Canary
Location
Location
Location
Location
Location
Location
Android Dev Summit 2019 extended Seoul Android Gradle plugin 4.0.0
v4.0
Feature // build.gradle android { buildFeatures { // Jetpack Compose
compose = false buildConfig = true // View Binding / viewBinding.enabled is deprecated viewBinding = false // Data Binding / dataBinding.enabled property is deprecated dataBinding = false aidl = true renderScript = true resValues = true shaders = true } }
Android Dev Summit 2019 extended Seoul