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

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

问题描述

我反编译的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天全站免登陆