VFY:无法解析的虚拟方法方法、VFY

2023-09-07 03:39:39 作者:Goodbye

我在我的Andr​​oid应用程序中使用杰克逊。

I am using Jackson in my android app.

我在构建路径添加了这两个jar:

I have added these two jars in my build-path:

jackson-core-asl-1.0.0.jar
jackson-mapper-asl-1.0.0.jar

不过,我一直在我的logcat中看到这样的:

But, I keep seeing this in my Logcat:

11-24 18:25:15.093: I/dalvikvm(28842): Could not find method org.codehaus.jackson.map.ObjectMapper.getTypeFactory, referenced from method org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.getJavaType
11-24 18:25:15.093: W/dalvikvm(28842): VFY: unable to resolve virtual method 17967: Lorg/codehaus/jackson/map/ObjectMapper;.getTypeFactory ()Lorg/codehaus/jackson/map/type/TypeFactory;

这是唯一的那个方法。我搜索的StackOverflow类似的错误,但他们都是:

It's only on that method. I have searched StackOverflow on similar errors, but all of them were:

在图书馆错误的版本(我是正确的) 在库不在/库,但在/ lib目录(我有他们在/库)

我的Andr​​oid版本是4.0.3。我结合使用这与春的Andr​​oid 库。

My Android version is 4.0.3. I am using this in combination with Spring Android libraries.

推荐答案

我也有类似的问题;假设你使用Eclipse,请尝试以下操作:

I had a similar problem; assuming you're using Eclipse, try the following:

右键点击您的项目 转到构建路径>配置构建路径... 点击排序和导出选项卡上的 检查框旁边的罐子,然后单击确定 清理并生成项目,然后看看它是否工作。

希望工程。