okHttp使用中报Could not find method java.nio.file.Files.newOutputStreamo警告问题

最近在使用okHttp过程中总是报下面的警告

I/dalvikvm﹕ Could not find method com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getContentLengthLong, referenced from method com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getContentLengthLong
W/dalvikvm﹕ VFY: unable to resolve virtual method 21498: Lcom/squareup/okhttp/internal/huc/HttpURLConnectionImpl;.getContentLengthLong ()J
D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm﹕ Could not find method com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getHeaderFieldLong, referenced from method com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getHeaderFieldLong
W/dalvikvm﹕ VFY: unable to resolve virtual method 21503: Lcom/squareup/okhttp/internal/huc/HttpURLConnectionImpl;.getHeaderFieldLong (Ljava/lang/String;J)J
D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
I/dalvikvm﹕ Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink
W/dalvikvm﹕ VFY: unable to resolve static method 24080: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a
W/dalvikvm﹕ VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
W/dalvikvm﹕ VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
I/dalvikvm﹕ Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source
W/dalvikvm﹕ VFY: unable to resolve static method 24079: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000a
查询了下发现是因为okHttp支持的一些API需要java7.0或者android M ,如果运行在低版本下okHttp就会报这些警告,直接忽略就可以了。


参考:https://github.com/square/okhttp/wiki/FAQs


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值