按照官方文档给出的配置,在7.0以下能够正常的升级,但是在7.0的手机上遇到了如下问题:
03-09 10:20:15.897 17264-17264 E/CrashReport: file location is /storage/emulated/0/Download/com.mapgoo.mailianbao/.beta/apk/commapgoomailianbao_100_479c01d5-295f-4b56-979e-fd79f5982592.apk
03-09 10:20:15.898 17264-17264 E/CrashReport: install failed, contentUri is null!
03-09 10:20:15.900 17264-17264 E/CrashReport: upgrade failed:(2080)安装失败,请检查您的App是否兼容7.0设备
03-09 10:20:15.900 17264-17264 E/CrashReport: download fail, please try later
问题是:
7.0以上bugly使用了android.support.v4.content.FileProvider来做升级,但是它是已反射的方式使用的
bugly对FileProvider的使用参见,他们开发的博客:
http://blog.csdn.net/wwj_748/article/details/52664647
解决办法:
避免对FileProvider的混淆:
-keep public class android.support.v4.content.FileProvider {*;}