What does $1 mean in exceptions like this:
Error:[AndroidApp] at com.android.dx.command.dexer.Main$1.processFileBytes
What does $1 mean in exceptions like this:
Error:[AndroidApp] at com.android.dx.command.dexer.Main$1.processFileBytes
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:
*this may useful to you *
http://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html