Android中RuntimeException("Stub!")的含义 [英] meaning of RuntimeException("Stub!") in Android

查看:155
本文介绍了Android中RuntimeException("Stub!")的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在浏览Android代码,因为我想查看Activity.finish()方法的内容.

I was surfing in Android code because I wanted to see what is into Activity.finish() method.

我只想确认在Activity.finish()中将调用onDestroy()方法.

I just wanted to have the confirmation that in Activity.finish() there would be a call to onDestroy() method.

但是我在这种方法(以及许多其他方法)中发现的是:

But what I found in this method (and in many others) was:

public void finish() {
    throw new RuntimeException("Stub!");
}

那么我在哪里可以找到真正破坏活动的代码? 谢谢!

So WHERE Can I find the code that really destroys the Activity? Thanks!

推荐答案

这是因为在SDK中找不到源代码. 要查看源代码,您需要下载Android SDK的源代码,以便Android Studio可以显示相应的代码.

This is because source code is not found in SDK. To see the source code, you need to download source for Android SDK, so Android studio can display the respective code.

这篇关于Android中RuntimeException("Stub!")的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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