MVP架构在Android的使用。Okhttp3、Retrofit2、Rxjava2 ,AutoDispose解决RxJava内存泄漏
简书地址:https://www.jianshu.com/p/ae0b21d3238a
本Demo由项目中提取修改
使用的第三方库:
//butterknife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//okhttp3
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation "com.squareup.okhttp3:logging-interceptor:3.10.0"
//retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
//rxjava2
implementation "io.reactivex.rxjava2:rxjava:2.1.12"
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
//AutoDispose解决RxJava内存泄漏
implementation 'com.uber.autodispose:autodispose:0.7.0'
implementation 'com.uber.autodispose:autodispose-android:0.7.0'
implementation 'com.uber.autodispose:autodispose-android-archcomponents:0.7.0'
//Material-dialogs
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
//jetbrains 注解
implementation 'org.jetbrains:annotations-java5:15.0'