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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Iñaki Villar
July 01, 2018
Technology
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Advanced Topics Android
Google IO Extended 2018 Bangkok
Iñaki Villar
July 01, 2018
More Decks by Iñaki Villar
See All by Iñaki Villar
Scaling Android Builds in Pandemic Times
cdsap
1
180
Building Android Projects with kts
cdsap
2
310
The Build Shrugged
cdsap
1
130
State of Testing in Kotlin
cdsap
0
290
Dexs, R8 and 3.3
cdsap
0
410
Deep Dive Work Manager
cdsap
0
370
Kotlin: Server-Client
cdsap
0
120
Droidcon Dubai : Kotlin - Server - Client
cdsap
0
97
Kotlin: Server-Client
cdsap
3
560
Other Decks in Technology
See All in Technology
証券システムを10年Scalaで作り続けるということ - 関数型まつり2026
krrrr38
3
700
記録をかんたんに、提案をパーソナルに ── AIであすけんが目指すもの
oprstchn
0
160
GuardrailからGovernanceへ~AIエージェント運用の次の課題~
sbspsy
1
210
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
370
Zoom2Youtube.Claude
kawaguti
PRO
2
440
プロダクトだけじゃない、社内プロセスにおける自動化・省力化ノススメ
kakehashi
PRO
1
1.2k
グローバルチームと挑むプロダクト開発
sansantech
PRO
1
160
初めてのDatabricks勉強会
taka_aki
2
240
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
270
完全自律ロボットを作りたくて、先に開発を自律させた話(ROS Japan UG #63 LT)
rryz09
0
360
Foxgloveについて 実際にExtensionを開発して公開するまでの話 / About Foxglove: The Story of Developing and Releasing an Extension
ry0_ka
0
170
SRE Lounge Hiroshimaへの招待
grimoh
0
310
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Optimising Largest Contentful Paint
csswizardry
37
3.8k
Into the Great Unknown - MozCon
thekraken
41
2.6k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Tell your own story through comics
letsgokoyo
1
990
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
890
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
180
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