参考:

KTX 和 Kotlin android extension 都到底是个啥?

Android KTX

KTX 是被称为Android之光的 JakeWharton 写的

Android KTX 是一组 Kotlin 扩展程序,属于 Android Jetpack 系列。
它优化了供 Kotlin 使用的 Jetpack 和 Android 平台 API。
Android KTX 旨在让您利用 Kotlin 语言功能(例如扩展函数/属性、lambda、命名参数和参数默认值),
以更简洁、更愉悦、更惯用的方式使用 Kotlin 进行 Android 开发。
Android KTX 不会向现有的 Android API 添加任何新功能。

引入:

dependencies {implementation 'androidx.core:core-ktx:1.0.0'
}

Android KTX 官网介绍


+--- androidx.core:core-ktx:1.0.2
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.2.50 -> 1.3.41 (*)
|    +--- androidx.annotation:annotation:1.0.2 -> 1.1.0
|    \--- androidx.core:core:1.0.2 -> 1.1.0-rc01 (*)

androidx.core:core:

+--- androidx.core:core:1.0.0 -> 1.1.0-rc01
|    +--- androidx.annotation:annotation:1.1.0-rc01 -> 1.1.0
|    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.2.0-alpha01
|    |    +--- androidx.lifecycle:lifecycle-common:2.2.0-alpha01
|    |    |    \--- androidx.annotation:annotation:1.1.0-rc01 -> 1.1.0
|    |    +--- androidx.arch.core:core-common:2.1.0-beta01 (*)
|    |    \--- androidx.annotation:annotation:1.1.0-rc01 -> 1.1.0
|    +--- androidx.versionedparcelable:versionedparcelable:1.1.0-rc01
|    |    +--- androidx.annotation:annotation:1.1.0-rc01 -> 1.1.0
|    |    \--- androidx.collection:collection:1.0.0 -> 1.1.0-rc01
|    |         \--- androidx.annotation:annotation:1.1.0-rc01 -> 1.1.0
|    \--- androidx.collection:collection:1.0.0 -> 1.1.0-rc01 (*)

Kotlin Android Extensions

Kotlin Android Extensions 是Kotlin官方推出的一个插件,提高android开发体验的一个东西

Kotlin Android Extensions插件允许我们获得与其中一些库相同的体验,而无需添加任何额外的代码。

引入:

apply plugin: 'kotlin-android-extensions'

kotlin android extensions 官网介绍

+--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.41
|         +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.41
|         \--- org.jetbrains:annotations:13.0

Android KTX 和 Kotlin android extension对比相关推荐

  1. Android KTX与Kotlin Android Extensions

    Android KTX Android KTX是Google官方推荐的一套便利的Android API扩展函数库.因还处于beta阶段,相关API并不丰富,但既然是出自JakeWharton大神之手, ...

  2. 【翻译】ANDROID KTX – 使用Kotlin进行Android开发

    原文地址:ANDROID KTX – ANDROID DEVELOPMENT WITH KOTLIN [正在翻译中] 介绍 Android KTX is an open source library ...

  3. KTX 和 Kotlin android extension 都到底是个啥?

    1. KTX是什么 Android官网对于KTX的介绍:https://developer.android.com/kotlin/ktx KTX 是被称为Android之光的 JakeWharton  ...

  4. kotlin android获取按钮,Kotlin Android按钮

    Android Button是用于在单击时执行事件的按钮.它是android.widget.Button类下的一个UI组件.要了解有关Android Button的更多信息, 请参阅Android B ...

  5. 隆重推出:Android KTX 预览版让 Kotlin 代码更精简

    最近逛官网发现Android KTX ,Android KTX 是一套扩展插件.它能帮助开发者更为简洁.通顺和优雅地使用 Kotlin 语言开发 Android 应用.目前版本0.2,Google 表 ...

  6. Google发布Android KTX预览版

    前天,Google 发布了 Android KTX 预览版,Android KTX 是一组扩展程序,它能使 Android 上的 Kotlin 代码更简洁,从而提高开发者的编程体验. 大家知道,Goo ...

  7. kotlin android 4,Kotlin Android Extensions: 与 findViewById 说再见 (KAD 04)

    时间:Aug 16, 2017 原文链接:https://antonioleiva.com/kotlin-android-extensions/ 在 Kotlin1.1.4版本 发布后,原作者依据 K ...

  8. Android Kotlin开发之Android KTX

    Android KTX |Android Jetpack 的一部分. Android KTX 是包含在 Android Jetpack 及其他 Android 库中的一组 Kotlin 扩展程序.KT ...

  9. 如何使您的Kotlin Android动画可访问

    When researching examples for a first ever Android contribution, few examples existed for animations ...

最新文章

  1. LeetCode实战:Nim 游戏
  2. Android Activity初探
  3. 限制php-cgi进程数量,php-fcgi进程数超过预设值问题的解决
  4. Java: for(;;) vs. while(true)
  5. Linux操作系统知识
  6. Jquery使用手册3--css操作 作者:choy
  7. 为什么说苹果是唯一在乎你隐私的科技公司?
  8. TIOBE 2 月编程语言排行榜:Python 逼近 C,Groovy 重回 TOP20
  9. VB 感染EXE 程序病毒源码
  10. 关于iOS 热更新(热修复)你必须知道的一种方法- JSPatch
  11. [2003] Can't connect to MySQL server on 'localhost' (13) 错误解决方法 【主要是linux下php连接不上mysq时】...
  12. 海康大华宇视安防摄像机平台RTSP直播流拉转输出RTSP/RTMP/HLS/HTTP-FLV并获取直播流地址
  13. 渡课学习第17天:JavaScript一脸懵逼
  14. mac下密码加密zip,暴力破解zip,生成密钥字典
  15. 第十一周OJ-Q50解题方法
  16. 【數論】【搜索】【SCOI2009】遊戲
  17. 简要描述如何安装配置apache的一个开源Hadoop
  18. 微信公众号自定义菜单跳转到历史消息页面
  19. 高度仿PC版《微信读书》,好看的小说、读书网站
  20. 字节跳动智力题-分金块问题

热门文章

  1. 基于51单片机出租车计价器(霍尔测速)
  2. 体积只有2M,屎上最好用的免费开源电脑录屏软件!
  3. 耳挂式蓝牙耳机原理_挂脖式蓝牙耳机怎么选,挂脖式蓝牙耳机看看这些品牌
  4. Java小游戏-幸运抽奖
  5. 【视频教程】Javascript ES6 教程39— ES6 ba
  6. Redis 分布式锁进化史解读+缺陷分析
  7. 股票高频数据(分钟数据)的入门分析方法——已实现波动率的计算(含完整代码)
  8. 关于微信小程序背景图片设置
  9. Python简单爬取图书信息及入库
  10. 中国3月份原油进口量触及一年高位