我测试了下 .setApkMD5("595edf9db4e839bf0ac7c192e693ecac"),然后运行报错了,我看了下日志是
java.util.IllegalFormatConversionException: d != java.lang.String
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4403)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2885)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2839)
at java.util.Formatter.format(Formatter.java:2524)
at java.util.Formatter.format(Formatter.java:2459)
at java.lang.String.format(String.java:2870)
at com.king.app.updater.service.DownloadService.startDownload(DownloadService.java:134)
我测试了下 .setApkMD5("595edf9db4e839bf0ac7c192e693ecac"),然后运行报错了,我看了下日志是 java.util.IllegalFormatConversionException: d != java.lang.String at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4403) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2885) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2839) at java.util.Formatter.format(Formatter.java:2524) at java.util.Formatter.format(Formatter.java:2459) at java.lang.String.format(String.java:2870) at com.king.app.updater.service.DownloadService.startDownload(DownloadService.java:134)
我看了下好像是这个引起的吧 Log.d(Constants.TAG,String.format("UpdateConfig.apkMD5:%d",apkMD5)); %d的问题?