Android kotlin 开发推荐优秀三方库

在用java开发Android的时候有很多方便的库如:butterknife,rxjava等,但kotlin的使用很多原来java上方便的库,在kotlin上不再方便。

  1. 替换butternife更好工具
在Gralde中配置:

apply plugin: 'kotlin-android-extensions'

之后可以kotlin 快速导入view

  1. 快速序列化
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
androidExtensions {
        experimental = true
    }
}

实体
@Parcelize data class MyData(var message:String,var hehehe: Boolean,var temp :Int):Parcelable 
  1. Autopage Android快捷跳转ui库 快捷的
project : build.gradle 项目的gradle配置

buildscript {
    repositories {
        maven { url 'https://www.jitpack.io' }
    }

项目里配置

apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
androidExtensions {
        experimental = true
    }
}

    kapt com.github.smartbackme.AutoPage:autopage-processor:1.0.7
    implementation com.github.smartbackme.AutoPage:autopage:1.0.7

就可以实现页面急速跳转

ApMainActivity2.newInstance().apply {
                message = "123"
            } .start(this)

github地址:https://github.com/smartbackme/AutoPage

  1. leakcanary—内存检测工具
debugImplementation com.squareup.leakcanary:leakcanary-android:2.0-beta-1

github地址:https://www.github.com/square/leakcanary

  1. Logger—支持多种类型数据打印
implementation 'com.orhanobut:logger:2.2.0'

github地址:https://github.com/orhanobut/logger

  1. Retrofit 方便的网络请求,结合kotlin协程
    github地址:https://github.com/square/retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'

  1. okhttp 网络请求库

github地址:https://github.com/square/okhttp

  1. glide 图片请求库,okhttp可加持

github地址:https://github.com/bumptech/glide

  1. MMKV 替代SharePreference的高性能key-value组件
    github地址:https://github.com/tencent/mmkv
dependencies {
    implementation 'com.tencent:mmkv:1.0.23'
}
  1. SmartRefreshLayout 下拉刷新、上拉加载非常好用

github地址:https://github.com/scwang90/SmartRefreshLayout/

  1. ImmersionBar 沉浸式状态栏
    github地址:https://github.com/gyf-dev/immersionbar

  2. BaseRecyclerViewAdapterHelper 非常好用Recyvlerview适配器
    github地址:https://github.com/CymChad/BaseRecyclerViewAdapterHelper

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

二蛋和他的大花

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值