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 (노현석)
N.E.X.T LEVEL
pluu
3
390
안드로이드 기술 이력서의 최소 조건
pluu
1
2.2k
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
570
Android Studio와 좀 더 친해지기
pluu
0
140
우리모두 삽질한다
pluu
0
1.3k
Re:Android Studio 설정 살펴보기 및 생산성 올리기
pluu
0
1.5k
What's new in Android development tools
pluu
1
860
What's new in Android development tools
pluu
1
430
개발자 Side Next Step ~ 커뮤니티 x Android
pluu
2
260
Other Decks in Programming
See All in Programming
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
150
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
220
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
180
Alba: Why, How and What's So Interesting
okuramasafumi
0
240
Amazon Bedrock Multi Agentsを試してきた
tm2
1
180
Vue.jsでiOSアプリを作る方法
hal_spidernight
0
120
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
140
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
180
為你自己學 Python
eddie
0
530
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
190
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
310
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
250
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
The Cult of Friendly URLs
andyhume
78
6.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Facilitating Awesome Meetings
lara
51
6.2k
Why Our Code Smells
bkeepers
PRO
335
57k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
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