Android KTX 和 Kotlin android extension对比
参考:
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对比相关推荐
- Android KTX与Kotlin Android Extensions
Android KTX Android KTX是Google官方推荐的一套便利的Android API扩展函数库.因还处于beta阶段,相关API并不丰富,但既然是出自JakeWharton大神之手, ...
- 【翻译】ANDROID KTX – 使用Kotlin进行Android开发
原文地址:ANDROID KTX – ANDROID DEVELOPMENT WITH KOTLIN [正在翻译中] 介绍 Android KTX is an open source library ...
- KTX 和 Kotlin android extension 都到底是个啥?
1. KTX是什么 Android官网对于KTX的介绍:https://developer.android.com/kotlin/ktx KTX 是被称为Android之光的 JakeWharton ...
- kotlin android获取按钮,Kotlin Android按钮
Android Button是用于在单击时执行事件的按钮.它是android.widget.Button类下的一个UI组件.要了解有关Android Button的更多信息, 请参阅Android B ...
- 隆重推出:Android KTX 预览版让 Kotlin 代码更精简
最近逛官网发现Android KTX ,Android KTX 是一套扩展插件.它能帮助开发者更为简洁.通顺和优雅地使用 Kotlin 语言开发 Android 应用.目前版本0.2,Google 表 ...
- Google发布Android KTX预览版
前天,Google 发布了 Android KTX 预览版,Android KTX 是一组扩展程序,它能使 Android 上的 Kotlin 代码更简洁,从而提高开发者的编程体验. 大家知道,Goo ...
- kotlin android 4,Kotlin Android Extensions: 与 findViewById 说再见 (KAD 04)
时间:Aug 16, 2017 原文链接:https://antonioleiva.com/kotlin-android-extensions/ 在 Kotlin1.1.4版本 发布后,原作者依据 K ...
- Android Kotlin开发之Android KTX
Android KTX |Android Jetpack 的一部分. Android KTX 是包含在 Android Jetpack 及其他 Android 库中的一组 Kotlin 扩展程序.KT ...
- 如何使您的Kotlin Android动画可访问
When researching examples for a first ever Android contribution, few examples existed for animations ...
最新文章
- LeetCode实战:Nim 游戏
- Android Activity初探
- 限制php-cgi进程数量,php-fcgi进程数超过预设值问题的解决
- Java: for(;;) vs. while(true)
- Linux操作系统知识
- Jquery使用手册3--css操作 作者:choy
- 为什么说苹果是唯一在乎你隐私的科技公司?
- TIOBE 2 月编程语言排行榜:Python 逼近 C,Groovy 重回 TOP20
- VB 感染EXE 程序病毒源码
- 关于iOS 热更新(热修复)你必须知道的一种方法- JSPatch
- [2003] Can't connect to MySQL server on 'localhost' (13) 错误解决方法 【主要是linux下php连接不上mysq时】...
- 海康大华宇视安防摄像机平台RTSP直播流拉转输出RTSP/RTMP/HLS/HTTP-FLV并获取直播流地址
- 渡课学习第17天:JavaScript一脸懵逼
- mac下密码加密zip,暴力破解zip,生成密钥字典
- 第十一周OJ-Q50解题方法
- 【數論】【搜索】【SCOI2009】遊戲
- 简要描述如何安装配置apache的一个开源Hadoop
- 微信公众号自定义菜单跳转到历史消息页面
- 高度仿PC版《微信读书》,好看的小说、读书网站
- 字节跳动智力题-分金块问题