/*
* okhttp请求
* */
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
//图片加载框架
implementation 'com.github.bumptech.glide:glide:4.8.0'
/*
* gson解析
* */
implementation 'com.google.code.gson:gson:2.8.5'
/*
* 上拉刷新下拉加载
* */
implementation 'com.jcodecraeer:xrecyclerview:1.5.9'
implementation 'com.android.support:recyclerview-v7:28.0.0'
//友盟登录
implementation 'com.umeng.umsdk:analytics:7.5.4'
implementation 'com.umeng.umsdk:common:1.5.4'
//扫描二维码
implementation 'cn.yipianfengye.android:zxing-library:2.2'
implementation 'com.android.support:design:28.0.0'
//强制转换成为 28 版本
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '28.0.0' //此处填写你项目使用的sdk版本
}
}
}
}
最大的bulder里面加入
//友盟 三方的依赖
buildscript {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/umsdk/release' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
权限
<!--网络权限-->
<uses-permission android:name="android.permission.INTERNET" />
<!--读取全选-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- umeng统计 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- 添加如下权限,以便使用更多的第三方SDK和更精准的统计数据 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--相机权限-->
<uses-permission android:name="android.permission.CAMERA"/>