1

What does $1 mean in exceptions like this:

Error:[AndroidApp] at com.android.dx.command.dexer.Main$1.processFileBytes
AVEbrahimi
  • 17,993
  • 23
  • 107
  • 210
  • 9
    $1 represents an Anonymous inner class inside Main class... see more about Anonymous classes here http://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html – Gopal Gopi Dec 28 '13 at 05:49

2 Answers2

1

I'll answer through an example

package com.examples;

public class Example {  
    public static void main(String[] args) {
        Runnable runner = new Runnable() {          
            @Override
            public void run() {
                System.out.println(this.getClass());
            }
        };
        runner.run();
    }
}

When you compile the following class in a file Example.java

javac Example.java

you end up with two .class files

Example.class
Example$1.class

And if you run the main method, it prints out

class com.examples.Example$1

This is how the java language generates .class files for anonynmous inner classes.

See:

Community
  • 1
  • 1
Sotirios Delimanolis
  • 274,122
  • 60
  • 696
  • 724
0

*this may useful to you *

http://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html

SuRu
  • 739
  • 1
  • 6
  • 19