在java.util.Deque.push异常java.lang.NoSuchMethodError [英] Exception java.lang.NoSuchMethodError on java.util.Deque.push

查看:161
本文介绍了在java.util.Deque.push异常java.lang.NoSuchMethodError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这真的很奇怪,谷歌开发者控制台,错误报告页。

It's really strange, Google Developer Console, error reporting page.

,因为它似乎,在多个Android设备我的应用程序崩溃。提供的异常日志说:

As it seems, my application crashes on several Android devices. The exception log provided says:

java.lang.NoSuchMethodError: java.util.Deque.push
at com.larvalabs.svgandroid.SVGParser$SVGHandler.<init>(SVGParser.java:869)
at com.larvalabs.svgandroid.SVGBuilder.build(SVGBuilder.java:147)
at myapp.graphic.PictureCache.getSvgPicture(PictureCache.java:59)
at myapp.graphic.PictureCache.getSvgPictureDrawable(PictureCache.java:65)
at myapp.activities.startup.ActivityStartup.setupCustomGraphic(ActivityStartup.java:92)
at myapp.activities.startup.ActivityStartup.onCreate(ActivityStartup.java:35)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
...

我使用该库:

I'm using that library:

HTTP://$c$c.google.com/p / SVG-的android-2 /

我包括源代码,而不是简单地链接外部库。

I included the source cod, not simply linked the external library.

在code似乎在 java.util.Deque.push 失败(的NoSuchMethodError )。这不是源$ C ​​$ C,我复制并粘贴一个问题,似乎没有出列方法在运行时找到了!它是如何可能的?无法想象。

The code seems to fail on java.util.Deque.push (NoSuchMethodError). It's not a problem of the source code I've copied and pasted, it seems that no dequeue method is found on runtime! How it's possible? Can't imagine.

编辑: 双端队列的定义:

Deque<Matrix> matrixStack = new LinkedList<Matrix>();

在code是提高对这一问题:

The code that raise the problem:

matrixStack.push(new Matrix());

难道新的Matrix()返回一个不接受推()方法的价值?

Is it possible that new Matrix() returns a value that is not accepted by the push() method?

推荐答案

您的项目引用 java.util.Deque 这是只有在API层面增加9

Your project references java.util.Deque which was only added in API level 9

http://developer.android.com/reference/java/util /Deque.html

使用API​​级别和LT装置; 9将失败,因为他们不能调用这个类/方法,因为它并没有对他们的存在。

Devices with API level < 9 will fail as they cannot call this Class/method as it doesn't exist on them.

这篇关于在java.util.Deque.push异常java.lang.NoSuchMethodError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆