反编译apk,问题lambda [英] Decompile apk, problems lambda

查看:156
本文介绍了反编译apk,问题lambda的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Im反编译的apk分别出现了.java文件,但是有些文件的名称为"AudioPlayerActivity $$ Lambda $ 1.java",这是什么"$$ Lambda $ 1"?

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"??

推荐答案

"AudioPlayerActivity $$ Lambda $ 1.java",这些基本上是在"AudioPlayerActivity.java"(现为"AudioPlayerActivity.java")内部编写的匿名代码块.可以具有任意数量的匿名代码块,因此在对它进行反编译时,所有这些代码块都将转换为单独的类,并在末尾按顺序排列一个数字.让我们举个例子,我有一个HelloWorld.java类,其中包含一个块

"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) {

            }
        });

然后在反编译时,我将获得3个类helloworld.smali,helloworld $ 1.smali(带有runOnUithread的代码)和helloworld $ 2.smali(带有onClickListener的代码).

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).

这篇关于反编译apk,问题lambda的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆