Android 项目工具类小记
2021-11-02 本文已影响0人
全球顶尖伪极客
AutoService
Tablayout开源库
// AndroidX
dependencies {
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
}
// Old 用上面的AndroidX方式现在
dependencies{
compile 'com.android.support:support-v4:23.1.1'
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
}
okdownload可靠,灵活,高性能以及强大的下载引擎
Project Gradle
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
Module Grradle
// core
com.liulishuo.okdownload:okdownload:{latest_version}
// provide sqlite to store breakpoints
com.liulishuo.okdownload:sqlite:{latest_version}
// provide okhttp to connect to backend
// and then please import okhttp dependencies by yourself
com.liulishuo.okdownload:okhttp:{latest_version}
// provide interface to match filedownloader
com.liulishuo.okdownload:filedownloader:{latest_version}
// provide interface for kotlin extension
com.liulishuo.okdownload:ktx{latest_version}
解压ZIP工具类官网地址
ZIP4j的github地址
应用场景:动态下载H5的zip包,离线解压加载
//远程依赖
implementation 'net.lingala.zip4j:zip4j:2.9.0'
//下载到本地的jar包依赖
api files('libs/zip4j-2.9.0.jar') //zip解压缩使用
Jar包下载地址或者远程依赖查找方式
点击GitHub地址后,选择readme.md里面的mavencentral 点开即可查看下载jar包地址或者gradle依赖方式。https://search.maven.org/artifact/net.lingala.zip4j/zip4j/2.9.0/jar