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
2
310
안드로이드 기술 이력서의 최소 조건
pluu
1
2k
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
540
Android Studio와 좀 더 친해지기
pluu
0
130
우리모두 삽질한다
pluu
0
1.3k
Re:Android Studio 설정 살펴보기 및 생산성 올리기
pluu
0
1.5k
What's new in Android development tools
pluu
1
840
What's new in Android development tools
pluu
1
420
개발자 Side Next Step ~ 커뮤니티 x Android
pluu
2
260
Other Decks in Programming
See All in Programming
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
850
Jakarta EE meets AI
ivargrimstad
0
260
たのしいparse.y
ydah
3
120
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
110
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
260
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
340
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
270
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
300
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Designing for Performance
lara
604
68k
Navigating Team Friction
lara
183
15k
Visualization
eitanlees
146
15k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
BBQ
matthewcrist
85
9.4k
Code Review Best Practice
trishagee
65
17k
For a Future-Friendly Web
brad_frost
175
9.4k
We Have a Design System, Now What?
morganepeng
51
7.3k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
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