简体   繁体   English

java.util.Deque.push上的异常java.lang.NoSuchMethodError

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

It's really strange, Google Developer Console, error reporting page. 真奇怪,Google Developer Console,错误报告页面。

As it seems, my application crashes on several Android devices. 看来,我的应用程序在多个Android设备上崩溃了。 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://code.google.com/p/svg-android-2/ http://code.google.com/p/svg-android-2/

I included the source cod, not simply linked the external library. 我包括了源代码,而不是简单地链接了外部库。

The code seems to fail on java.util.Deque.push ( NoSuchMethodError ). 代码似乎在java.util.Deque.pushNoSuchMethodError )上失败。 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. 无法想象。

EDIT: The Deque is define: 编辑:双端队列定义:

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

The code that raise the problem: 引发问题的代码:

matrixStack.push(new Matrix());

Is it possible that new Matrix() returns a value that is not accepted by the push() method? new Matrix()是否可能返回push()方法不接受的值?

Your project references java.util.Deque which was only added in API level 9 您的项目引用仅在API级别9中添加的java.util.Deque

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

Devices with API level < 9 will fail as they cannot call this Class/method as it doesn't exist on them. API级别<9的设备将失败,因为它们不能调用此类/方法,因为它们不存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM