Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decompile apk, problems lambda

Im Decompiled apk, respectively, appeared .java files, But some files have in the name of such "AudioPlayerActivity$$Lambda$1.java", what is this "$$Lambda$1"??

like image 487
Big_Energy Avatar asked Jul 27 '26 07:07

Big_Energy


1 Answers

"AudioPlayerActivity$$Lambda$1.java" these is basically an anonymous block of code written inside the "AudioPlayerActivity.java", now the "AudioPlayerActivity.java" can have any number of anonymous block of code, so while decompiling it, all these blocks gets converted into separate classes with a number at the end in a sequential order. Let's take an example, I have a class HelloWorld.java which contains a block

runOnUiThread(new Runnable() {
        @Override
        public void run() {

        }
    });

and another anonymous block for a clicklistener on button like this.

button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });

then on decompiling i would get 3 classes helloworld.smali, helloworld$1.smali (with code for runOnUithread) and helloworld$2.smali (with code for onClickListener).

like image 98
Ravinder Bhandari Avatar answered Jul 30 '26 10:07

Ravinder Bhandari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!