DexFile.class error in eclipse
Asked Answered
B

2

19

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:

    // 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

Bebeeru answered 21/12, 2010 at 18:8 Comment(0)
B
5

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.

Bebeeru answered 27/12, 2010 at 22:11 Comment(1)
the link is now brokenBoarer
N
84

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.

Nonaggression answered 11/8, 2011 at 22:26 Comment(4)
This is the real answer if you don't want to see the DexFile.class source. Eclipse->Window->Show View->(Other->Debug->)BreakpointsSalomesalomi
Agreed, I went into debug, breakpoints window and then clicked on the ("xx") icon, which is Delete all breakpoints.Baca
Such a silly and annoying issue... removing all the breakpoints is a pain especially when it's so easy to accidentally create the problem. Thanks for the solution though.Blisse
Yet another reason why I hate Eclipse.. IntelliJ ftw.Catchpole
B
5

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.

Bebeeru answered 27/12, 2010 at 22:11 Comment(1)
the link is now brokenBoarer

© 2022 - 2024 — McMap. All rights reserved.