添加以下依赖:
compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
注意结尾的@aar可以将库中的AndroidManifest.xml文件一起导出,所以不用再将一下文本添加到项目的AndroidManifest.xml文件中:
<meta-data
android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule"
android:value="GlideModule" />
另外:
-keep class com.bumptech.glide.integration.okhttp3.OkHttpGlideModule添加到proguard文件中。
网友评论