“ VFY:死代码”尝试使用getBytes(Charset)时

在我的应用程序中一切正常。然后,我做了一个小的重构,一个关键组件停止工作。当我查看LogCat输出时,这就是我发现的:
WARN/dalvikvm(488): VFY: unable to resolve virtual method 10830: Ljava/lang/String;.getBytes (Ljava/nio/charset/Charset;)[B
DEBUG/dalvikvm(488): VFY: replacing opcode 0x6e at 0x000e
DEBUG/dalvikvm(488): VFY: dead code 0x0011-0015 in Lcom/appiancorp/tempo/android/service/CommentXmlHttpMessageConverter;.writeInternal (Lcom/appiancorp/tempo/android/model/EntryComment;Lorg/springframework/http/HttpOutputMessage;)V
这至少是令人惊讶的。我查看了文档,方法就在那里,给出了什么?     
已邀请:
getBytes(Charset)
存在于API9及更高版本中。确保您正在构建此版本的SDK或使用API​​1中存在的
getBytes(String charsetName)
。 您还可以使用在线SDK文档中的“按API级别过滤”复选框,以使您构建的版本中没有的方法变灰。     

要回复问题请先登录注册