推荐很好用的调试工具——调试全能王,各大应用市场都已上架,欢迎下载使用。
![](https://camo.githubusercontent.com/830727fe0439814d119eaee8d97dc4530783b12a255f118afef220719febc153/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545342542382538422545382542442542442d2545352538442538452545342542382542412545352542412539342545372539342541382545352542382538322545352539432542412d726564)
代码托管
![Release](https://camo.githubusercontent.com/19a7712e89c1d469f0efcb4ac65ca8867af20689ac0fe6041d3526e40d975542/68747470733a2f2f6a69747061636b2e696f2f762f77616e646572736e61696c2f65617379687474702e737667)
使用
- 因为使用了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'
}
}
}
- module的build.gradle中的添加依赖,自行修改为最新版本,同步后通常就可以用了:
dependencies {
...
implementation 'cn.wandersnail:easyhttp:latestVersion'
implementation 'com.squareup.retrofit2:retrofit:latestVersion'
implementation 'com.squareup.retrofit2:adapter-rxjava2:latestVersion'
implementation 'io.reactivex.rxjava2:rxandroid:latestVersion'
implementation 'com.alibaba:fastjson:latestVersion'
}
- 如果从jcenter下载失败。在project的build.gradle里的repositories添加内容,最好两个都加上,添加完再次同步即可。
allprojects {
repositories {
...
mavenCentral()
maven { url 'https://dl.bintray.com/wandersnail/androidx/' }
}
}
功能