SlideShare ist ein Scribd-Unternehmen logo
1 von 15
What We Concern?
Faster Build Time
More Productivity
Smaller APK size
Benefits Users and Product
Run Time Performance
Closer Look at Android Run Time
Kotlin source
code
(.kt)
Kotlin compiler
(JIT)
Compiler
(AoT)
Android Studio does not support all Java 8 language features,
Supported Java 8 language features and APIs
https://developer.android.com/studio/write/java8-support
Desugaring History
Goal : Allow newer language features to run on all devices
https://android-developers.googleblog.com/2014/12/hello-world-meet-our-new-experimental.html
Jack &Jil ToolChain
 Transforms .java to .dex
 Supports lambda functions & method refs all
android versions.
 Supports Android API 26+
 Does not support java.time.*
 Failed to convert to .dex directly with no bytecode
in between.
 Slow in compilation
RetroLambda
Back Support of Java 8’s lambda expressions to Java 7,6 and 5.
class Java8 {
interface Logger {
void log(String s);
}
public static void main(String... args) {
sayHi(s -> System.out.println(s));
}
private static void sayHi(Logger logger) {
logger.log("Hello!");
}
}
$ javac *.java
$ ls
Java8.java Java8.class Java8$Logger.class
$ $ANDROID_HOME/build-tools/28.0.2/dx --dex --output . *.class Uncaught translation error:
com.android.dx.cf.code.SimException:
ERROR in Java8.main:([Ljava/lang/String;)V: invalid opcode ba - invokedynamic requires --min-sdk-version
>= 26 (currently 13)
1 error; aborting
Sample class
Button button = (Button)findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(this, "Button clicked",
Toast.LENGTH_LONG).show();
}
});
without lambda expression
with lambda expressions
Button button = (Button)findViewById(R.id.button);
button.setOnClickListener(v -> Toast.makeText(this, "Button
clicked", Toast.LENGTH_LONG).show());
D8 Dexer
 Replacement for Dx.
 Faster Compared to Dx.
 Reducing build time and generated small apk size.
 Optimised .dex means more performance.
https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html
Default toolchain desugaring
D8 integrated desugaring
Just Use Kotlin
 Provides Lambdas
 Method references
 Default and static (-Like) functions on interfaces
 Source transformation
 All of those features are actually implemented by kotlinc is exactly same way that D8
desugars the java 8 byte code
Increases team efficiency
Complies with existing Java code
Easily maintainable
Less buggy
Reduced mobile app development cost
Safe and secure
Resources
 https://developer.android.com/studio/write/java8-support
 https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html
 https://law.justia.com/cases/federal/appellate-courts/cafc/17-1118/17-1118-2018-03-27.html (Google vs Oracle copy right case)
 https://android-developers.googleblog.com/2017/04/java-8-language-features-support-update.html
 https://jakewharton.com/androids-java-8-support/
 https://pusher.com/state-of-kotlin#kotliners
 https://insights.stackoverflow.com/survey/2018/
 https://kotlinlang.org/docs/reference/faq.html
 https://www.appbrain.com/stats/libraries/details/kotlin/kotlin
15
THANK YOU
Phani Gullapalli

Weitere ähnliche Inhalte

Was ist angesagt?

Android Study Jam - Info Session
Android Study Jam - Info SessionAndroid Study Jam - Info Session
Android Study Jam - Info SessionAITIKDANDAPAT
 
Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18Jorge Morales
 
Continuous Delivery for Mobile platforms (iOS and a bit of Android)
Continuous Delivery for Mobile platforms (iOS and a bit of Android)Continuous Delivery for Mobile platforms (iOS and a bit of Android)
Continuous Delivery for Mobile platforms (iOS and a bit of Android)Rami Rantala
 
Python Tools for Visual Studio
Python Tools for Visual StudioPython Tools for Visual Studio
Python Tools for Visual StudioAxilis
 
2014 austin-api-sdks-are-apis-too
2014 austin-api-sdks-are-apis-too2014 austin-api-sdks-are-apis-too
2014 austin-api-sdks-are-apis-tooJeff Brateman
 
Android Study Jam - Info Session
Android Study Jam - Info SessionAndroid Study Jam - Info Session
Android Study Jam - Info SessionDSCVSSUT
 
Introduction to Android Studio
Introduction to Android StudioIntroduction to Android Studio
Introduction to Android StudioMichael Pan
 
Python Tools for Visual Studio
Python Tools for Visual StudioPython Tools for Visual Studio
Python Tools for Visual StudioAxilis
 
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人Evan Lin
 
Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for AndroidHan Yin
 
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line BotEvan Lin
 
Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014Florent BENOIT
 
Szczepan.faber.gradle
Szczepan.faber.gradleSzczepan.faber.gradle
Szczepan.faber.gradlemagda3695
 
Cross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeCross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeKorhan Bircan
 
Fastlane on Android 介紹
Fastlane on Android 介紹Fastlane on Android 介紹
Fastlane on Android 介紹Kros Huang
 

Was ist angesagt? (20)

Android Study Jam - Info Session
Android Study Jam - Info SessionAndroid Study Jam - Info Session
Android Study Jam - Info Session
 
Github copilot
Github copilotGithub copilot
Github copilot
 
Android Studio vs. ADT
Android Studio vs. ADTAndroid Studio vs. ADT
Android Studio vs. ADT
 
Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18
 
Continuous Delivery for Mobile platforms (iOS and a bit of Android)
Continuous Delivery for Mobile platforms (iOS and a bit of Android)Continuous Delivery for Mobile platforms (iOS and a bit of Android)
Continuous Delivery for Mobile platforms (iOS and a bit of Android)
 
Python Tools for Visual Studio
Python Tools for Visual StudioPython Tools for Visual Studio
Python Tools for Visual Studio
 
Study Jam Session 2
Study Jam Session 2Study Jam Session 2
Study Jam Session 2
 
2014 austin-api-sdks-are-apis-too
2014 austin-api-sdks-are-apis-too2014 austin-api-sdks-are-apis-too
2014 austin-api-sdks-are-apis-too
 
Android Study Jam - Info Session
Android Study Jam - Info SessionAndroid Study Jam - Info Session
Android Study Jam - Info Session
 
Introduction to Android Studio
Introduction to Android StudioIntroduction to Android Studio
Introduction to Android Studio
 
Python Tools for Visual Studio
Python Tools for Visual StudioPython Tools for Visual Studio
Python Tools for Visual Studio
 
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
 
Ionic best practices
Ionic best practicesIonic best practices
Ionic best practices
 
Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for Android
 
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
 
Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014
 
Kotlin
KotlinKotlin
Kotlin
 
Szczepan.faber.gradle
Szczepan.faber.gradleSzczepan.faber.gradle
Szczepan.faber.gradle
 
Cross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeCross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React Native
 
Fastlane on Android 介紹
Fastlane on Android 介紹Fastlane on Android 介紹
Fastlane on Android 介紹
 

Ähnlich wie D8 Dexer

Programming in HTML5 With Java Script and CSS3
Programming in HTML5 With Java Script and CSS3Programming in HTML5 With Java Script and CSS3
Programming in HTML5 With Java Script and CSS3Testbells
 
Java Programming 100 Programming Challenges
Java Programming 100 Programming ChallengesJava Programming 100 Programming Challenges
Java Programming 100 Programming ChallengesJavier Crisostomo
 
Android developer's toolbox
Android developer's toolboxAndroid developer's toolbox
Android developer's toolboxAlex Verdyan
 
whats-new-netbeans-ide-7x.pptx
whats-new-netbeans-ide-7x.pptxwhats-new-netbeans-ide-7x.pptx
whats-new-netbeans-ide-7x.pptxGabrielSoche
 
005528214.pdf
005528214.pdf005528214.pdf
005528214.pdfEidTahir
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and AndroidShady Selim
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTManuel Carrasco Moñino
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xGeertjan Wielenga
 
What’s New & Cool in NetBeans IDE 7.x
What’s New & Cool in NetBeans IDE 7.xWhat’s New & Cool in NetBeans IDE 7.x
What’s New & Cool in NetBeans IDE 7.xErik Gur
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18Xiaoli Liang
 
PluginandPlay_DevoxxBE.pptx
PluginandPlay_DevoxxBE.pptxPluginandPlay_DevoxxBE.pptx
PluginandPlay_DevoxxBE.pptxSimonedeGijt
 
Comparison between Eclipse and Android Studio for Android Development
Comparison between Eclipse and Android Studio for Android DevelopmentComparison between Eclipse and Android Studio for Android Development
Comparison between Eclipse and Android Studio for Android DevelopmentWillow Cheng
 
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?9 series
 
Green flag Wrap up Google Solution Challenge.pdf
Green flag Wrap up Google Solution Challenge.pdfGreen flag Wrap up Google Solution Challenge.pdf
Green flag Wrap up Google Solution Challenge.pdfGoogleDeveloperStude22
 
Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewelljwi11iams
 
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)DataArt
 
Android studio 4.0 new features preview
Android studio 4.0 new features previewAndroid studio 4.0 new features preview
Android studio 4.0 new features previewConcetto Labs
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application DevelopmentRamesh Prasad
 

Ähnlich wie D8 Dexer (20)

Programming in HTML5 With Java Script and CSS3
Programming in HTML5 With Java Script and CSS3Programming in HTML5 With Java Script and CSS3
Programming in HTML5 With Java Script and CSS3
 
Java Programming 100 Programming Challenges
Java Programming 100 Programming ChallengesJava Programming 100 Programming Challenges
Java Programming 100 Programming Challenges
 
Android developer's toolbox
Android developer's toolboxAndroid developer's toolbox
Android developer's toolbox
 
whats-new-netbeans-ide-7x.pptx
whats-new-netbeans-ide-7x.pptxwhats-new-netbeans-ide-7x.pptx
whats-new-netbeans-ide-7x.pptx
 
005528214.pdf
005528214.pdf005528214.pdf
005528214.pdf
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and Android
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
 
Java 9 and Beyond
Java 9 and BeyondJava 9 and Beyond
Java 9 and Beyond
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.x
 
What’s New & Cool in NetBeans IDE 7.x
What’s New & Cool in NetBeans IDE 7.xWhat’s New & Cool in NetBeans IDE 7.x
What’s New & Cool in NetBeans IDE 7.x
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18
 
PluginandPlay_DevoxxBE.pptx
PluginandPlay_DevoxxBE.pptxPluginandPlay_DevoxxBE.pptx
PluginandPlay_DevoxxBE.pptx
 
Comparison between Eclipse and Android Studio for Android Development
Comparison between Eclipse and Android Studio for Android DevelopmentComparison between Eclipse and Android Studio for Android Development
Comparison between Eclipse and Android Studio for Android Development
 
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
Why to Choose Kotlin in 2023 to Build Mobile Apps Faster?
 
Green flag Wrap up Google Solution Challenge.pdf
Green flag Wrap up Google Solution Challenge.pdfGreen flag Wrap up Google Solution Challenge.pdf
Green flag Wrap up Google Solution Challenge.pdf
 
Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewell
 
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
 
Android studio 4.0 new features preview
Android studio 4.0 new features previewAndroid studio 4.0 new features preview
Android studio 4.0 new features preview
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application Development
 

Kürzlich hochgeladen

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Kürzlich hochgeladen (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

D8 Dexer

  • 1.
  • 2. What We Concern? Faster Build Time More Productivity Smaller APK size Benefits Users and Product Run Time Performance
  • 3. Closer Look at Android Run Time Kotlin source code (.kt) Kotlin compiler
  • 5. Android Studio does not support all Java 8 language features, Supported Java 8 language features and APIs https://developer.android.com/studio/write/java8-support
  • 6. Desugaring History Goal : Allow newer language features to run on all devices https://android-developers.googleblog.com/2014/12/hello-world-meet-our-new-experimental.html Jack &Jil ToolChain  Transforms .java to .dex  Supports lambda functions & method refs all android versions.  Supports Android API 26+  Does not support java.time.*  Failed to convert to .dex directly with no bytecode in between.  Slow in compilation
  • 7. RetroLambda Back Support of Java 8’s lambda expressions to Java 7,6 and 5.
  • 8. class Java8 { interface Logger { void log(String s); } public static void main(String... args) { sayHi(s -> System.out.println(s)); } private static void sayHi(Logger logger) { logger.log("Hello!"); } } $ javac *.java $ ls Java8.java Java8.class Java8$Logger.class $ $ANDROID_HOME/build-tools/28.0.2/dx --dex --output . *.class Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in Java8.main:([Ljava/lang/String;)V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) 1 error; aborting Sample class
  • 9. Button button = (Button)findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(this, "Button clicked", Toast.LENGTH_LONG).show(); } }); without lambda expression with lambda expressions Button button = (Button)findViewById(R.id.button); button.setOnClickListener(v -> Toast.makeText(this, "Button clicked", Toast.LENGTH_LONG).show());
  • 10. D8 Dexer  Replacement for Dx.  Faster Compared to Dx.  Reducing build time and generated small apk size.  Optimised .dex means more performance. https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html
  • 11. Default toolchain desugaring D8 integrated desugaring
  • 13.  Provides Lambdas  Method references  Default and static (-Like) functions on interfaces  Source transformation  All of those features are actually implemented by kotlinc is exactly same way that D8 desugars the java 8 byte code Increases team efficiency Complies with existing Java code Easily maintainable Less buggy Reduced mobile app development cost Safe and secure
  • 14. Resources  https://developer.android.com/studio/write/java8-support  https://android-developers.googleblog.com/2017/08/next-generation-dex-compiler-now-in.html  https://law.justia.com/cases/federal/appellate-courts/cafc/17-1118/17-1118-2018-03-27.html (Google vs Oracle copy right case)  https://android-developers.googleblog.com/2017/04/java-8-language-features-support-update.html  https://jakewharton.com/androids-java-8-support/  https://pusher.com/state-of-kotlin#kotliners  https://insights.stackoverflow.com/survey/2018/  https://kotlinlang.org/docs/reference/faq.html  https://www.appbrain.com/stats/libraries/details/kotlin/kotlin