使用com.squareup.wire wire-runtime
。
代码:
Wire wire = new Wire();
VerifyTicketRsp ticketRsp = wire.parseFrom(moaResult.objectBytes, VerifyTicketRsp.class);
错误信息:
java.lang.IllegalArgumentException: No WireType for value 118
at com.squareup.wire.WireType.valueOf(WireType.java:36)
at com.squareup.wire.MessageAdapter.read(MessageAdapter.java:521)
at com.squareup.wire.Wire.parseFrom(Wire.java:144)
at com.squareup.wire.Wire.parseFrom(Wire.java:135)
注意:此代码在99%设备上正常运行。但有时得到这个错误,概率是1/100000。有谁知道 ?