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
120
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
150
Building Android Projects with kts
cdsap
2
280
The Build Shrugged
cdsap
1
82
State of Testing in Kotlin
cdsap
0
260
Dexs, R8 and 3.3
cdsap
0
370
Deep Dive Work Manager
cdsap
0
340
Kotlin: Server-Client
cdsap
0
100
Droidcon Dubai : Kotlin - Server - Client
cdsap
0
66
Kotlin: Server-Client
cdsap
3
530
Other Decks in Technology
See All in Technology
[CVPR2025論文読み会] Linguistics-aware Masked Image Modelingfor Self-supervised Scene Text Recognition
s_aiueo32
0
210
MySQL HeatWave:サービス概要のご紹介
oracle4engineer
PRO
4
1.7k
ゆるふわエンジニアでもAIフローにチャレンジしたい!!~Zapierのすゝめ~
masakiokuda
2
100
実践アプリケーション設計 ①データモデルとドメインモデル
recruitengineers
PRO
4
520
新卒(ほぼ)専業Kagglerという選択肢
nocchi1
1
2.4k
実践アプリケーション設計 ②トランザクションスクリプトへの対応
recruitengineers
PRO
4
590
モバイルアプリ研修
recruitengineers
PRO
4
540
第4回 関東Kaggler会 [Training LLMs with Limited VRAM]
tascj
12
1.9k
RAID6 を楔形文字で組んで現代人を怖がらせましょう(実装編)
mimifuwa
1
320
イオン店舗一覧ページのパフォーマンスチューニング事例 / Performance tuning example for AEON store list page
aeonpeople
2
310
会社にデータエンジニアがいることでできるようになること
10xinc
9
1.6k
モダンフロントエンド 開発研修
recruitengineers
PRO
4
1.2k
Featured
See All Featured
KATA
mclloyd
32
14k
A Tale of Four Properties
chriscoyier
160
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Building Adaptive Systems
keathley
43
2.7k
Fireside Chat
paigeccino
39
3.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Making Projects Easy
brettharned
117
6.3k
Facilitating Awesome Meetings
lara
55
6.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Into the Great Unknown - MozCon
thekraken
40
2k
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