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
270
Dexs, R8 and 3.3
cdsap
0
370
Deep Dive Work Manager
cdsap
0
350
Kotlin: Server-Client
cdsap
0
100
Droidcon Dubai : Kotlin - Server - Client
cdsap
0
67
Kotlin: Server-Client
cdsap
3
530
Other Decks in Technology
See All in Technology
AI機能プロジェクト炎上の 3つのしくじりと学び
nakawai
0
120
個人でデジタル庁の デザインシステムをVue.jsで 作っている話
nishiharatsubasa
3
5.1k
Linux カーネルが支えるコンテナの仕組み / LF Japan Community Days 2025 Osaka
tenforward
1
130
Behind Postgres 18: The People, the Code, & the Invisible Work | Claire Giordano | PGConfEU 2025
clairegiordano
0
140
Dify on AWS 環境構築手順
yosse95ai
0
140
もう外には出ない。より快適なフルリモート環境を目指して
mottyzzz
13
11k
QA業務を変える(!?)AIを併用した不具合分析の実践
ma2ri
0
150
IBC 2025 動画技術関連レポート / IBC 2025 Report
cyberagentdevelopers
PRO
2
180
会社を支える Pythonという言語戦略 ~なぜPythonを主要言語にしているのか?~
curekoshimizu
3
830
頭部ふわふわ浄酔器
uyupun
0
110
OPENLOGI Company Profile for engineer
hr01
1
45k
AIプロダクトのプロンプト実践テクニック / Practical Techniques for AI Product Prompts
saka2jp
0
110
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
890
BBQ
matthewcrist
89
9.9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Mobile First: as difficult as doing things right
swwweet
225
10k
Automating Front-end Workflow
addyosmani
1371
200k
Done Done
chrislema
185
16k
Facilitating Awesome Meetings
lara
57
6.6k
Documentation Writing (for coders)
carmenintech
75
5.1k
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