1

in my android project I have one single activity named NewsViewActivity.java. But when I do some static analysis over the apk file itself, it shows multiple files with the same name just $(some number appended to it). NewsViewActivity$1.java NewsViewActivity$2.java.

If i use method profiling I also see the same. What may be the reason for that?

P basak
  • 4,874
  • 11
  • 40
  • 63

1 Answers1

2

You probably have anonymous inner classes created within your activity. Since you give an anonymous inner class no name, the compiler has to come up with some way to represent it, and this is what it has chosen. Have a look at Why does Java code with an inner class generates a third SomeClass$1.class file? for more info.

Community
  • 1
  • 1
digitaljoel
  • 26,265
  • 15
  • 89
  • 115
  • 1
    as a (likely) example, if you were to set an onclick listener like so: `view.setOnClickListener(new OnClickListener(){});`, that listener would be labeled as described – JRaymond Nov 08 '12 at 23:29
  • oh I see, yes i just used the listener like the code snippet. – P basak Nov 09 '12 at 00:37