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
Advanced Topics Android
Search
Iñaki Villar
July 01, 2018
Technology
0
99
Advanced Topics Android
Google IO Extended 2018 Bangkok
Iñaki Villar
July 01, 2018
Tweet
Share
More Decks by Iñaki Villar
See All by Iñaki Villar
Scaling Android Builds in Pandemic Times
cdsap
1
130
Building Android Projects with kts
cdsap
2
280
The Build Shrugged
cdsap
1
77
State of Testing in Kotlin
cdsap
0
220
Dexs, R8 and 3.3
cdsap
0
350
Deep Dive Work Manager
cdsap
0
280
Kotlin: Server-Client
cdsap
0
85
Droidcon Dubai : Kotlin - Server - Client
cdsap
0
55
Kotlin: Server-Client
cdsap
3
510
Other Decks in Technology
See All in Technology
SpannerとAurora DSQLの同時実行制御の違いに想いを馳せる
masakikato5
0
570
Restarting_SRE_Road_to_SRENext_.pdf
_awache
0
170
AI・LLM事業部のSREとタスクの自動運転
shinyorke
PRO
0
300
Cline、めっちゃ便利、お金が飛ぶ💸
iwamot
19
19k
caching_sha2_passwordのはなし
boro1234
0
220
Tirez profit de Messenger pour améliorer votre architecture
tucksaun
1
150
Compose MultiplatformにおけるiOSネイティブ実装のベストプラクティス
enomotok
1
210
モノリスの認知負荷に立ち向かう、コードの所有者という思想と現実
kzkmaeda
0
110
ペアプログラミングにQAが加わった!職能を超えたモブプログラミングの事例と学び
tonionagauzzi
1
150
Enterprise AI in 2025?
pamelafox
0
100
大規模プロジェクトにおける 品質管理の要点と実践 / 20250327 Suguru Ishii
shift_evolve
0
290
Go の analysis パッケージで自作するリファクタリングツール
kworkdev
PRO
1
420
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
7
620
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
8
700
Understanding Cognitive Biases in Performance Measurement
bluesmoon
28
1.6k
GraphQLの誤解/rethinking-graphql
sonatard
70
10k
Writing Fast Ruby
sferik
628
61k
Navigating Team Friction
lara
184
15k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
It's Worth the Effort
3n
184
28k
Gamification - CAS2011
davidbonilla
81
5.2k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Producing Creativity
orderedlist
PRO
344
40k
Transcript
None
Inaki Villar @inyaki_mwc Advanced Android Topics
None
Testing D8/R8 ART
Testing
Android Test • Includes existing libraries • APIs and Kotlin
• Open Source
• Robolectric 4.0 (alpha) • androidx.test support • Support Espresso
None
None
gradlew clean connectedAndroidTest
gradlew clean connectedAndroidTest gradlew clean test
gradlew clean connectedAndroidTest gradlew clean test
https://proandroiddev.com/robolectric-testing-with-androidjunitrunner-86292bceef25
None
None
None
None
None
None
D8/R8
D8/R8 Kotlin File Java File kotlinc javac class dex apk
D8/R8 Kotlin File Java File kotlinc javac class dex apk
class dex apk
class dex apk
class dex apk
dex
dex
D8/R8 kotlinc javac DX APK < 3.0
D8/R8 kotlinc javac DX APK kotlinc javac DX DX Merging
APK < 3.0 > 3.0
D8/R8 kotlinc javac Desugar DX 3.0/3.1 APK
D8/R8 kotlinc javac Desugar DX kotlinc javac D8 APK 3.0/3.1
3.1+ APK
D8/R8 kotlinc javac Desugar DX kotlinc javac D8 APK 3.0/3.1
3.1+ APK
None
75% reduced size of MainDexFile Release 56% reduced size of
MainDexFile Debug 10% reduced time for Debug builds
D8/R8 2nd phase : D8/DX(fully deprecated) - 1 year approx.
1st phase : D8/DX - 6 months approx. 3rd phase: DX removed from AS
D8/R8
D8/R8 kotlinc javac Proguard D8/DX No R8 APK
D8/R8 kotlinc javac Proguard D8/DX kotlinc javac R8 APK No
R8 APK
D8/R8 Russia 0 - Spain 3
D8/R8
ART
ART Applications Android Framework ART Native Libraries HAL Kernel
ART Applications Android Framework ART Native Libraries HAL Kernel Dalvik
Pre Lollipop
ART Dalvik JIT Just In Time AOT Ahead Of Time
ART Dalvik JIT Just In Time AOT Ahead Of Time
App Run Translate ByteCode to Machine code Less Space Less Memory
ART Dalvik JIT Just In Time AOT Ahead Of Time
App Install Translate ByteCode to Machine code App Run Faster Better Startup Battery Performance
None
JIT Returns
JIT Returns
None
Memory and Storage Kotlin Cloud Profiles ART
ART
ART
ART
ART Inlining - CheckParameterIsNotNull
ART Inlining - CheckParameterIsNotNull https://blacklenspub.com/inline-function-in-kotlin-adb51b0eab76
Cloud Profiles
Cloud Profiles
None
Testing D8/R8 ART Summary
None
Kotlin for Android Developers https://goo.gl/forms/cJO6To3bgYGOMhMJ2
Inaki Villar ขอขอบคุณ /Thank you @inyaki_mwc