# commons-android_1
**Repository Path**: m163/commons-android_1
## Basic Information
- **Project Name**: commons-android_1
- **Description**: 常用的工具类、基类等
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 9
- **Created**: 2023-12-21
- **Last Updated**: 2023-12-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## 推荐一款工具箱【蜗牛工具箱】APP,涵盖广,功能丰富。生活实用、效率办公、图片处理等等,还有隐藏的VIP功能,总之很多惊喜的功能。
点击下方按钮或扫码下载【蜗牛工具箱】
[](https://appgallery1.huawei.com/#/app/C109066561)

## 代码托管
[](https://maven-badges.herokuapp.com/maven-central/cn.wandersnail/commons-android)
[](https://jitpack.io/#cn.wandersnail/commons-android)
## 使用
1. 因为使用了jdk8的一些特性,需要在module的build.gradle里添加如下配置:
```
//纯java的项目
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
//有kotlin的项目还需要在project的build.gradle里添加
allprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
jvmTarget = '1.8'
apiVersion = '1.3'
languageVersion = '1.3'
}
}
}
```
2. module的build.gradle中的添加依赖,自行修改为最新版本,需要哪个就依赖哪个,同步后通常就可以用了:
```
dependencies {
...
implementation 'cn.wandersnail:commons-android:latestVersion'
}
```
2. 在project的build.gradle里的repositories添加内容,最好两个都加上,添加完再次同步即可。
```
allprojects {
repositories {
...
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
```
## 功能
- SharedPreferences、Log、UI、图片、数学、文件操作、加密、网络、日期、数据库等工具类
- wifi、Toast、zip、存储帮助类
- 一些基类