android ERR:stack=java.lang.StackOverflowError:stack size 8MB

本文探讨了导致UI渲染性能下降的几个常见原因,包括加载大图、复杂的布局设计及Fragment或recycleViewItem布局引发的问题,并提供了调试GPU过度绘制的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


引起错误的原因:

1.加载大图

2.太过于复杂的布局;

可以打开手机的设置->开发者选项中 打开 调试GPU过度绘制  你就可以看见:


这个颜色值 下面有图参考;



3.Fragment的布局 或者recycleView Item布局》 View view=inflater.inflate(R.layout.fragment_current_hotspot,container,false);  这里引起的;


02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] Runtime aborting... 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] Dumping all threads without mutator lock held 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] All threads: 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] DALVIK THREADS (133): 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] "main" prio=6 tid=1 Runnable 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] | group="" sCount=0 ucsCount=0 flags=0 obj=0x718b9370 self=0xa9f66e00 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] | sysTid=1908 nice=-2 cgrp=foreground sched=0/0 handle=0xaa3c4470 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] | state=R schedstat=( 0 0 0 ) utm=303 stm=160 core=3 HZ=100 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] | stack=0xbe585000-0xbe587000 stackSize=8188KB 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] | held mutexes= "abort lock" "mutator lock"(shared held) 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] native: #00 pc 00373285 /apex/com.android.art/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+76) 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] native: #01 pc 0044a5bb /apex/com.android.art/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+214) 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] native: #02 pc 0046200b /apex/com.android.art/lib/libart.so (art::DumpCheckpoint::Run(art::Thread*)+650) 02-21 18:45:59.833 1908 1908 F system_server: runtime.cc:669] native: #03 pc 0045d4bd /apex/com.android.art/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+352) 02-21 18:45:59.833 1908
03-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值