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.6k
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
490
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
810
What's new in Android development tools
pluu
1
400
개발자 Side Next Step ~ 커뮤니티 x Android
pluu
2
240
Modern Android Developer ~ 안내서
pluu
1
2.9k
Other Decks in Programming
See All in Programming
Synchronizationを支える技術
s_shimotori
1
150
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
110
Macとオーディオ再生 2024/11/02
yusukeito
0
140
macOS でできる リアルタイム動画像処理
biacco42
3
1.4k
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.6k
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
490
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
200
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
1.7k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
50
7.2k
How to Ace a Technical Interview
jacobian
275
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
A better future with KSS
kneath
238
17k
Teambox: Starting and Learning
jrom
132
8.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
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