eclipse eclipse中的DexFile.class错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4502445/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
DexFile.class error in eclipse
提问by ninjasense
I get this weird error everytime I debug in eclipse. It just seemed to appear one day and I was wondering if anyone else was running int the same problem. It does not affect my app in anyway visibly and does not cause a crash but it is an annoyance while debugging. Here is the full error:
每次我在 Eclipse 中调试时,都会遇到这个奇怪的错误。它似乎总有一天会出现,我想知道是否还有其他人遇到了同样的问题。它不会以任何方式明显地影响我的应用程序,也不会导致崩溃,但在调试时会很烦人。这是完整的错误:
// Compiled from DexFile.java (version 1.5 : 49.0, super bit)
public final class dalvik.system.DexFile {
// Method descriptor #8 (Ljava/io/File;)V
// Stack: 3, Locals: 2
public DexFile(java.io.File file) throws java.io.IOException;
0 aload_0 [this]
1 invokespecial java.lang.Object() [1]
4 new java.lang.RuntimeException [2]
7 dup
8 ldc <String "Stub!"> [3]
10 invokespecial java.lang.RuntimeException(java.lang.String) [4]
13 athrow
Line numbers:
[pc: 0, line: 4]
Local variable table:
[pc: 0, pc: 14] local: this index: 0 type: dalvik.system.DexFile
[pc: 0, pc: 14] local: file index: 1 type: java.io.File
// Method descriptor #18 (Ljava/lang/String;)V
// Stack: 3, Locals: 2
public DexFile(java.lang.String fileName) throws java.io.IOException;
0 aload_0 [this]
1 invokespecial java.lang.Object() [1]
4 new java.lang.RuntimeException [2]
7 dup
8 ldc <String "Stub!"> [3]
10 invokespecial java.lang.RuntimeException(java.lang.String) [4]
13 athrow
Line numbers:
[pc: 0, line: 5]
Local variable table:
[pc: 0, pc: 14] local: this index: 0 type: dalvik.system.DexFile
[pc: 0, pc: 14] local: fileName index: 1 type: java.lang.String
// Method descriptor #22 (Ljava/lang/String;Ljava/lang/String;I)Ldalvik/system/DexFile;
// Stack: 3, Locals: 3
public static dalvik.system.DexFile loadDex(java.lang.String sourcePathName, java.lang.String outputPathName, int flags) throws java.io.IOException;
0 new java.lang.RuntimeException [2]
3 dup
4 ldc <String "Stub!"> [3]
6 invokespecial java.lang.RuntimeException(java.lang.String) [4]
9 athrow
Line numbers:
[pc: 0, line: 6]
Local variable table:
[pc: 0, pc: 10] local: sourcePathName index: 0 type: java.lang.String
[pc: 0, pc: 10] local: outputPathName index: 1 type: java.lang.String
[pc: 0, pc: 10] local: flags index: 2 type: int
// Method descriptor #28 ()Ljava/lang/String;
// Stack: 3, Locals: 1
public java.lang.String getName();
0 new java.lang.RuntimeException [2]
3 dup
4 ldc <String "Stub!"> [3]
6 invokespecial java.lang.RuntimeException(java.lang.String) [4]
9 athrow
Line numbers:
[pc: 0, line: 7]
Local variable table:
[pc: 0, pc: 10] local: this index: 0 type: dalvik.system.DexFile
// Method descriptor #30 ()V
// Stack: 3, Locals: 1
public void close() throws java.io.IOException;
0 new java.lang.RuntimeException [2]
3 dup
4 ldc <String "Stub!"> [3]
6 invokespecial java.lang.RuntimeException(java.lang.String) [4]
9 athrow
Line numbers:
[pc: 0, line: 8]
Local variable table:
[pc: 0, pc: 10] local: this index: 0 type: dalvik.system.DexFile
// Method descriptor #32 (Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class;
// Stack: 3, Locals: 3
public java.lang.Class loadClass(java.lang.String name, java.lang.ClassLoader loader);
0 new java.lang.RuntimeException [2]
3 dup
4 ldc <String "Stub!"> [3]
6 invokespecial java.lang.RuntimeException(java.lang.String) [4]
9 athrow
Line numbers:
[pc: 0, line: 9]
Local variable table:
[pc: 0, pc: 10] local: this index: 0 type: dalvik.system.DexFile
[pc: 0, pc: 10] local: name index: 1 type: java.lang.String
[pc: 0, pc: 10] local: loader index: 2 type: java.lang.ClassLoader
// Method descriptor #37 ()Ljava/util/Enumeration;
// Signature: ()Ljava/util/Enumeration<Ljava/lang/String;>;
// Stack: 3, Locals: 1
public java.util.Enumeration entries();
0 new java.lang.RuntimeException [2]
3 dup
4 ldc <String "Stub!"> [3]
6 invokespecial java.lang.RuntimeException(java.lang.String) [4]
9 athrow
Line numbers:
[pc: 0, line: 10]
Local variable table:
[pc: 0, pc: 10] local: this index: 0 type: dalvik.system.DexFile
// Method descriptor #30 ()V
// Stack: 3, Locals: 1
protected void finalize() throws java.io.IOException;
0 new java.lang.RuntimeException [2]
3 dup
4 ldc <String "Stub!"> [3]
6 invokespecial java.lang.RuntimeException(java.lang.String) [4]
9 athrow
Line numbers:
[pc: 0, line: 11]
Local variable table:
[pc: 0, pc: 10] local: this index: 0 type: dalvik.system.DexFile
// Method descriptor #42 (Ljava/lang/String;)Z
public static native boolean isDexOptNeeded(java.lang.String arg0) throws java.io.FileNotFoundException, java.io.IOException;
}
Thanks
谢谢
采纳答案by ninjasense
I finally found an answer Here. It looks like when you debug, it tries to go into code for which it doesn't have (the android source). There is a way you can include that into your project to avoid this error. If the link above doesn't work, try this one.
我终于在这里找到了答案。看起来当您调试时,它会尝试进入它没有的代码(android 源代码)。有一种方法可以将其包含到您的项目中以避免此错误。如果上面的链接不起作用,请尝试此链接。
回答by jwanga
I discovered that this was happening because I set a breakpoint on a class definition. To fix it i used the break point window in the debug perspective to uncheck all breakpoints. Hope this helps.
我发现这是因为我在类定义上设置了断点。为了修复它,我使用调试透视图中的断点窗口取消选中所有断点。希望这可以帮助。