开发项目所需要的所有依赖
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.hjm:BottomTabBar:1.1.2'
implementation 'com.youth.banner:banner:1.4.10'
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-14'
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-14'
//没有使用特殊Header,可以不加这行
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.recker.flybanner:flybanner:1.3'
//最新版本
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
implementation 'com.gyf.immersionbar:immersionbar:2.3.1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.zhy:okhttputils:2.6.2'
implementation 'com.squareup.okhttp3:okhttp:3.3.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.3.1'
debugImplementation 'com.facebook.stetho:stetho:1.1.1'
//EventBus依赖(线程通信)
implementation 'org.greenrobot:eventbus:3.0.0'
//fresco依赖(加载图片)
implementation 'com.facebook.fresco:fresco:1.10.0'
//RxJava和Retrofit依赖(访问数据)
//gson数据解析器
implementation "com.squareup.retrofit2:converter-gson:$rootProject.ext.retrofitVersion"
//rxjava,回调适配器
implementation "com.squareup.retrofit2:adapter-rxjava2:$rootProject.ext.retrofitVersion"
implementation 'com.squareup.retrofit:retrofit:2.0.0-beta1'
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
//rxandroid,切换到主线程,响应式编程
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.0.0'
//retrofit 核心库
implementation "com.squareup.retrofit2:retrofit:$rootProject.ext.retrofitVersion"
//butterknife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
implementation 'com.gyf.immersionbar:immersionbar:2.3.1'
//interceptor依赖(拦截器)
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
//Xbanana
implementation 'com.hjm:BottomTabBar:1.2.2'
implementation 'com.xhb:xbanner:1.0.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'jp.wasabeef:glide-transformations:1.0.6'
//Glide
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.orhanobut:logger:2.2.0'
implementation 'com.github.LRH1993:AutoFlowLayout:1.0.5'
implementation 'com.github.userswlwork:pull-to-refresh:1.0.0'
implementation 'com.ramotion.cardslider:card-slider:0.3.0'
implementation 'com.sunfusheng:marqueeview:1.3.2'
implementation 'com.tencent.bugly:crashreport:latest.release'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'cn.yipianfengye.android:zxing-library:2.2'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.sunfusheng:marqueeview:1.3.3'
implementation 'com.jcodecraeer:xrecyclerview:1.3.2'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1' //此处填写你项目使用的sdk版本
}
}
}
}
外面build.gradle
ext{
retrofitVersion = '2.4.0'
rxandroidVersion = '2.1.0'
butterknifeVersion = '8.8.1'
okhttpVersion = '3.11.0'
}
jcenter
maven { url "https://jitpack.io" }