Android Fatal signal 11 (SIGSEGV) at 0x636f7d89 (code=1). How can it be tracked down?

后端 未结 24 1390
遥遥无期
遥遥无期 2020-11-22 08:33

I\'ve been reading the other posts on tracking down the reasons for getting a SIGSEGV in an Android app. I plan to scour my app for possible NullPointers relate

24条回答
  •  借酒劲吻你
    2020-11-22 08:58

    I got this error when I used ViewTreeObserver inside onDraw() function.

    @Override
    protected void onDraw(Canvas canvas) {
        // super.onDraw(canvas);
        ViewTreeObserver vto = mTextView.getViewTreeObserver();
        vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
                // some animation        
            }
        });
     }
    

提交回复
热议问题