Android 堆栈溢出错误

发布于 2024-11-02 12:54:03 字数 9776 浏览 3 评论 0原文

以下是我的堆栈跟踪。我浏览了它,但它只显示了一堆视图,坦率地说,我不太确定 stackoverflow 错误到底是什么。我读到了一些其他问题,有些人通过迭代解决了他们的问题(同样,不知道这些是什么)。对于应用程序的基本布局,当崩溃时,这是来自:

TabView (5 tabs) >第 5 个选项卡 >按下按钮时该选项卡中的 webview 。现在它确实崩溃了,直到我点击后退按钮返回到第五个选项卡,并且它并不是每次都会这样做。

感谢您的帮助!

编辑:我停止在模拟器上进行测试,但我还没有看到它在我的手机上崩溃。我将不胜感激并研究所提供的任何进一步帮助,但我认为这只是一个模拟器问题。

04-20 01:52:26.510: ERROR/AndroidRuntime(23240): FATAL EXCEPTION: main
04-20 01:52:26.510: ERROR/AndroidRuntime(23240): java.lang.StackOverflowError
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewRoot.checkThread(ViewRoot.java:2801)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewRoot.requestChildFocus(ViewRoot.java:1567)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.handleFocusGainInternal(View.java:2486)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3605)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3556)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3534)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabWidget.onFocusChange(TabWidget.java:425)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.onFocusChanged(View.java:2666)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.handleFocusGainInternal(View.java:2489)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.handleFocusGainInternal(ViewGroup.java:405)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3605)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestFocus(ViewGroup.java:1028)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestFocus(ViewGroup.java:1029)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3556)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:121)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.d

编辑:发布崩溃代码。

public class TwitterAuthUrl extends Activity {

    final static String TAG = "TwitterAuthUrl";
    WebView mWebView;

    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.twitterauthurl);
        Bundle extras = getIntent().getExtras();

        OAuthConsumer consumer = new DefaultOAuthConsumer("xxxxxxxxxxxxxxxxxxxxx",
        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");

        OAuthProvider provider = new DefaultOAuthProvider(
        "http://twitter.com/oauth/request_token",
        "http://twitter.com/oauth/access_token",
        "http://twitter.com/oauth/authorize");


        String authUrl = null;
        try {
            authUrl = provider.retrieveRequestToken(consumer, OAuth.OUT_OF_BAND);
            Log.d(TAG, "Success authUrl " + authUrl);
        } catch (OAuthMessageSignerException e) {
            e.printStackTrace();
        } catch (OAuthNotAuthorizedException e) {
            e.printStackTrace();
        } catch (OAuthExpectationFailedException e) {
            e.printStackTrace();
        } catch (OAuthCommunicationException e) {
            e.printStackTrace();
        }

        mWebView = (WebView) findViewById(R.id.webview);
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.loadUrl(authUrl);
        Log.d(TAG, "authUrl = " + authUrl);

    }
}

XML:

<?xml version="1.0" encoding="utf-8"?>
    <WebView  xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/webview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
    />

The following is my stacktrace. I looked through it but it just shows a bunch of views and frankly I'm not too sure what a stackoverflow error is exactly. I read on some of the other questions that some solved theirs through iterations (again, no idea what those are). For the basic layout of the app this is coming from when this crashes is:

TabView (5 tabs) > 5th tab > webview in that tab on button press. Now it does actually crash until i hit the back button to go back to the 5th tab and it doesn't do it every time.

Thanks for the help!

Edit: I stopped testing on the emulator and I have yet to see it crash on my phone. I will appreciate and look into any further help given but I think it was just an emulator issue.

04-20 01:52:26.510: ERROR/AndroidRuntime(23240): FATAL EXCEPTION: main
04-20 01:52:26.510: ERROR/AndroidRuntime(23240): java.lang.StackOverflowError
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewRoot.checkThread(ViewRoot.java:2801)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewRoot.requestChildFocus(ViewRoot.java:1567)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestChildFocus(ViewGroup.java:431)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.handleFocusGainInternal(View.java:2486)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3605)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3556)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3534)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabWidget.onFocusChange(TabWidget.java:425)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.onFocusChanged(View.java:2666)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.handleFocusGainInternal(View.java:2489)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.handleFocusGainInternal(ViewGroup.java:405)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3605)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestFocus(ViewGroup.java:1028)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.requestFocus(ViewGroup.java:1029)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.requestFocus(View.java:3556)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:121)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:788)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.widget.TabHost$1.onKey(TabHost.java:122)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.View.dispatchKeyEvent(View.java:3735)
04-20 01:52:26.510: ERROR/AndroidRuntime(23240):     at android.view.ViewGroup.d

Edit: Posting code on crash.

public class TwitterAuthUrl extends Activity {

    final static String TAG = "TwitterAuthUrl";
    WebView mWebView;

    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.twitterauthurl);
        Bundle extras = getIntent().getExtras();

        OAuthConsumer consumer = new DefaultOAuthConsumer("xxxxxxxxxxxxxxxxxxxxx",
        "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");

        OAuthProvider provider = new DefaultOAuthProvider(
        "http://twitter.com/oauth/request_token",
        "http://twitter.com/oauth/access_token",
        "http://twitter.com/oauth/authorize");


        String authUrl = null;
        try {
            authUrl = provider.retrieveRequestToken(consumer, OAuth.OUT_OF_BAND);
            Log.d(TAG, "Success authUrl " + authUrl);
        } catch (OAuthMessageSignerException e) {
            e.printStackTrace();
        } catch (OAuthNotAuthorizedException e) {
            e.printStackTrace();
        } catch (OAuthExpectationFailedException e) {
            e.printStackTrace();
        } catch (OAuthCommunicationException e) {
            e.printStackTrace();
        }

        mWebView = (WebView) findViewById(R.id.webview);
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.loadUrl(authUrl);
        Log.d(TAG, "authUrl = " + authUrl);

    }
}

The XML:

<?xml version="1.0" encoding="utf-8"?>
    <WebView  xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/webview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
    />

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

佞臣 2024-11-09 12:54:03

您有太多嵌套视图组(请参阅:java.lang.StackOverFlow 错误。怀疑观看次数太多?了解如何减少其中一些观看次数的提示)

You have too many nested viewgroups (see: java.lang.StackOverFlow error. Suspected too many views? for tips on how to reduce some of them)

芯好空 2024-11-09 12:54:03

通常发生这种情况是因为在您的一种方法中,您不断调用自己(我们称之为递归调用)。
检查你的方法以确保你调用了 super.whatever(),而不仅仅是whatever()。另外,最好在这里发布您的代码,这样我们就可以指出它到底发生在哪里。

Usually this happens because in one of your methods, you keep calling yourself (we call it recursive call).
Check your method to make sure you call super.whatever(), and not just whatever(). Also, it'd be great to post your code here so we can point to where exactly it happens.

一萌ing 2024-11-09 12:54:03

有时 StackOverflowErrro 只能出现在特定设备上,因为它们具有不同的堆栈大小,您可以阅读 有关 StackoverflowError 的文章

Sometimes StackOverflowErrro can appear on only particular devices because they have different stack size you can read article about StackoverflowError.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文