The most complete Android Kotlin learning route (Kotlin from entry, advanced to actual combat)

Kotlin is a static programming language for modern multi-platform applications developed by jetBrains. Kotlin code can be compiled into Java bytecode and JavaScript. Kotlin is open source, and the source code is here.

Kotlin contains a lot of syntactic sugar, which will greatly simplify our code volume and work efficiency when coding. And compared to the traditional Java language, Kotlin has a large number of shorthands, which can reduce a lot of boilerplate code that must be written in Java, reduce a lot of nesting such as if...else, reduce the implementation of a large number of interfaces, and the code structure will be clearer.

Currently in Android development, when you look at the source code, you will find a lot of Kotlin source code. When using some jetpack frameworks, most of them are Kotlin language. I believe that Kotlin will become the language of choice for Android development in the near future.

[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-J2WD78KO-1669818139747) (C:\Users\admin\Desktop\1ead2553c3ac42cc9f7f80b626716cd8.png)]

Efficient way to master Kotlin

Kotlin is a typical language that is easy to learn and difficult to master : the syntax is concise and easy to get started, but it has many new features that are not easy to master; even if you master the syntax of Kotlin, it is not easy to write elegant code. Not to mention the application scenarios and underlying implementation principles of Kotlin features.

Here I would like to share with you the summary of "Kotlin from Beginner to Master" and "Kotlin Advanced Enhanced Combat" compiled by Google engineers, to help you get started and master the Kotlin programming language with the least amount of effort . The content of the tutorial is from shallow to deep, easy to understand, rich in examples, both basic knowledge and advanced skills, partners who need it can click on the card at the end of the article to get it for free! !

"Kotlin Getting Started Tutorial Guide"

Chapter 1 Kotlin Getting Started Tutorial Guide

  • foreword

    img

Chapter 2 Overview

  • Server-side development with Kotlin
  • Android development with Kotlin
  • Kotlin JavaScript overview
  • Kotlin/Native for native development
  • Coroutines for scenarios such as asynchronous programming
  • New features in Kotlin 1.1
  • New features in Kotlin 1.2
  • New features in Kotlin 1.3

img

Chapter 3 begins

  • basic grammar
  • Idiom
  • Coding Standards

Chapter 4 Basics

  • basic type
  • Bag
  • Control flow: if, when, for, while
  • back and jump

Chapter 5 Classes and Objects

  • Classes and Inheritance
  • Properties and Fields
  • interface
  • visibility modifier
  • expand
  • data class
  • Sealed
  • generic
  • Nested classes vs inner classes
  • enum class
  • Object expressions and object declarations
  • Inline classes
  • entrust

Chapter 6 Functions and Lambda Expressions

  • function
  • Higher-order functions and lambda expressions
  • inline function

Chapter VII Miscellaneous

  • destructuring statement
  • Collections: List, Set, Map
  • interval
  • Type checking and conversion "is" and "as"
  • This expression
  • equality
  • operator overloading
  • air safety
  • abnormal
  • annotation
  • reflection
  • type-safe builder
  • type alias
  • Multi-platform programming
  • Keywords and Operators

Chapter 8 Java Interoperability and JavaScript

  • Call Java code in Kotlin
  • Call Kotlin from Java
  • JavaScript dynamic typing
  • Call JavaScript in Kotlin
  • Call Kotlin from JavaScript
  • JavaScript modules
  • JavaScript reflection
  • JavaScript DCE

Chapter 9 Coroutines

  • Coroutine Basics
  • Cancellation and timeout
  • channel (experimental)
  • composite suspend function
  • Coroutine context and scheduler
  • exception handling
  • select expressions (experimental)
  • Shared mutable state and concurrency

Chapter 10 Tools

  • Write Kotlin code documentation
  • Kotlin annotation processing
  • Use Gradle
  • Use Maven
  • Use Ant
  • Kotlin gives OSGi
  • compiler plugin
  • Stability of different components

Chapter 11 Summary of Frequently Asked Questions

  • FAQ
  • Comparison with the Java language
  • Comparison with Scala [officially deleted]

" Advanced Kotlin Enhanced Combat "

Chapter 1 Kotlin Getting Started Tutorial

  • Kotlin overview
  • Kotlin vs Java Comparison
  • Using Android Studio Skillfully
  • Know Kotlin basic types
  • Walking into Kotlin's array
  • Walking into Kotlin collections
  • full code
  • basic grammar

img

Chapter 2 Kotlin Practical Pit Avoidance Guide

  • Method input parameters are constants and cannot be modified
  • No Companion, INSTANCE?
  • Java overloading, how to make a clever transition in Kotlin?
  • Null gestures in Kotlin
  • Kotlin overrides methods in Java parent class
  • Kotlin becomes "ruthless", even TODO is not let go!
  • Pit in is, as`
  • Understanding of Property in Kotlin
  • also keyword
  • takeIf keyword
  • How to write singleton mode

Chapter 3 Project Combat "Kotlin Jetpack Combat"

  • Start with a Demo that worships the Great God
  • What is the experience of writing Gradle scripts in Kotlin?
  • The Triple Realm of Kotlin Programming
  • Kotlin higher order functions
  • Kotlin Generics
  • Kotlin extensions
  • Kotlin delegation
  • "Unknown" debugging techniques for coroutines
  • Graphical coroutine: suspend

" The most detailed Android version of kotlin coroutine entry advanced combat in history "

Chapter 1 Introduction to the Basics of Kotlin Coroutines

  • What is a coroutine
  • What is Job, Deferred, and coroutine scope
  • Basic usage of Kotlin coroutines

img

Chapter 2 Preliminary Explanation of Key Knowledge Points of Kotlin Coroutine

  • coroutine scheduler
  • coroutine context
  • Coroutine startup mode
  • Coroutine scope
  • suspend function

Chapter 3 Exception Handling of Kotlin Coroutines

  • The generation process of coroutine exception
  • Coroutine exception handling

Chapter 4 Basic application of kotlin coroutines in Android

  • Android uses kotlin coroutines
  • Using coroutines in Activity and Framgent
  • Use coroutines in ViewModel
  • Using Coroutines in Other Environments

Chapter 5 Network request encapsulation of kotlin coroutine

  • Common environment for coroutines
  • Encapsulation and use of coroutines under network requests
  • higher order function approach
  • Multi-state function return value method

Chapter 6 In-depth kotlin coroutine principle (1)

  • suspend's fancy intestines
  • Hidden behind -Continuation
  • Hope in the Village - SuspendLambda

Chapter 7 In-depth kotlin coroutine principle (2)

  • The little secrets of coroutines
  • The process of creating a coroutine
  • Coroutine Suspend and Resume
  • Coroutine execution and state machine

Chapter 8 Kotlin Jetpack in action

  • Start with a Demo that worships the Great God
  • What is the experience of writing Gradle scripts in Kotlin?
  • The Triple Realm of Kotlin Programming
  • Kotlin higher order functions
  • Kotlin Generics
  • Kotlin extensions
  • Kotlin delegation
  • "Unknown" debugging techniques for coroutines
  • Graphical coroutine principle

Chapter 9 Kotlin + Coroutine + Retrofit + MVVM Elegantly Realizes Network Requests

  • project configuration
  • Implementation ideas
  • Coroutine implementation
  • Coroutine + ViewModel + LiveData implementation
  • Subsequent optimization
  • exception handling
  • Update Retrofit 2.6.0

Due to the limited length of the article and too much content, only the table of contents and some screenshots are shown. Those who need the full version of the information can click the card at the end of the article to get it for free! !


Kotlin is often seen as the next Java, and in StackOverflow's 2019 developer survey, Kotlin was the 4th most "popular" and 5th most "wanted" programming language, the highest of any mobile programming language. Android development from Java to Kotlin has long been unstoppable.

I hope this article will help you learn and master the Kotlin language, and I hope all readers can go a long way on the advanced road of Android development, and encourage each other! !

Guess you like

Origin blog.csdn.net/Eqiqi/article/details/128123700