对Android中的堆栈的理解(Stack<E>)

本文探讨了Android编程中堆栈数据结构的使用,重点介绍堆栈作为缓存方式的角色。通过学习,读者将能掌握堆栈如何在Android应用中实现缓存功能。

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

             堆栈空间分配
栈(操作系统):由操作系统自动分配释放 ,存放函数的 参数值局部变量的值等。其操作方式类似于数据结构中的栈。
堆(操作系统): 一般由程序员分配释放, 若程序员不释放,程序结束时可能由OS回收,分配方式倒是类似于链表。

堆栈缓存方式

栈使用的是 一级缓存, 他们通常都是被调用时处于存储空间中,调用完毕立即释放。
堆则是存放在 二级缓存中,生命周期由虚拟机的垃圾回收算法来决定(并不是一旦成为孤儿对象就能被回收)。所以调用这些对象的速度要相对来得低一些

Stack

         栈(stack)在计算机科学中是限定仅在表尾进行插入或删除操作的线性表。栈是一种数据结构,它按照后进先出的原则存储数据,先进入的数据被压入栈底,最后的数据在栈顶,需要读数据的时候从栈顶开始弹出数据。栈是只能在某一端插入和删除的特殊线性表。用桶堆积物品,先堆进来的压在底下,随后一件一件往上堆。取走时,只能从上面一件一件取。读和取都在顶部进行,底部一般是不动的。栈就是一种类似桶堆积物品的数据结构,进行删除和插入的一端称栈顶,另一端称栈底。插入一般称为进栈,删除则称为退栈。 栈也称为后进先出表。

      Heap

    堆(heap)又被为优先队列(priority queue)。尽管名为优先队列,但堆并不是队列。回忆一下,在队列中,我们可以进行的限定操作是dequeue和enqueue。dequeue是按照进入队列的先后顺序来取出元素。而在堆中,我们不是按照元素进入队列的先后顺序取出元素的,而是按照元素的优先级取出元素。

这就好像候机的时候,无论谁先到达候机厅,总是头等舱的乘客先登机,然后是商务舱的乘客,最后是经济舱的乘客。每个乘客都有头等舱、商务舱、经济舱三种个键值(key)中的一个。头等舱->商务舱->经济舱依次享有从高到低的优先级。

   Android 之活动任务堆栈




java.lang.Object
  继承者 java.util.AbstractCollection<E>
      继承者 java.util.AbstractList<E>
          继承者 java.util.Vector<E>
              继承者 java.util.Stack<E>
所有已实现的接口:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class Stack<E>
     
      extends 
      Vector<E>
     

Stack 类表示后进先出(LIFO)的对象堆栈。它通过五个操作对类 Vector 进行了扩展 ,允许将向量视为堆栈。它提供了通常的pushpop 操作,以及取堆栈顶点的 peek 方法、测试堆栈是否为空的 empty 方法、在堆栈中查找项并确定到堆栈顶距离的search 方法。

首次创建堆栈时,它不包含项。

Deque 接口及其实现提供了 LIFO 堆栈操作的更完整和更一致的 set,应该优先使用此 set,而非此类。例如:

   Deque<Integer> stack = new ArrayDeque<Integer>();


       如果你的应用中涉及到的东西比较耗内存的话,比如:相机、第三方地图、腾讯、新浪、录音、视频播放、大量图片时,如果这些东西同时存在于应用中时,会有很多奇怪的问题出现,自动退出还不报错等等一系列的问题,还有,如果我们的应用中使用startActivity()过多而且并没有及时finish()掉的话,也会出现这样那样的问题,比如:退出应用时没有退出干净,或者莫名其妙的报OOM,启动的服务自动挂起什么的!        其实,Google已经提供了一套完整的机制让开发人员控制活动栈与任务栈
        
像这样的跳转我们在开发的过程中算是很长见到的了,在这里我就不贴代码了 ,假如就是有三个活动窗口(Activity1,Activity2Activity3)按先后顺序 从Activity1--startActivity()Activity2再到Activity3这个过程大家应该可以想象的到,在这个过程生成的活动堆栈如图所示:

https://i-blog.csdnimg.cn/blog_migrate/b4c3446741ac490710f9f8f460c50e2b.jpeg
    这个地方说明下,有时候大家可以想着从1到2时可以绑定数据完成回显,但是如果要简单的回显用绑定或startActivityForResult()这两种方式启动,但是如果涉及到三个以上的活动惑更多活动之间的跳转时,有时候不得不必须重新启动新的活动,也就出现了前面的1>>2>>3>>4>>>>>>>甚至更多的活动跳转,这样一个个关闭有时候还是关不干净,应用退出的时候也还是不干净的,更搞笑的是有时候还有用户在多个活动之间跳转并不进行任何数据操作时还要求返回上一个Activity时你就不能直接finish掉上一个Activity,不然人家说你跳转不对,针对这个问题我们来看下Google提供的堆栈任务控制机制吧,很简单,用Flag来控制,这个时候就有个问题,提供的方法有setFlag()、addFlag(),这两个肯定有什么区别的,不然不会出现两个控制Flag的方法的

如果是点击回退键的过程中也会有不一样同样点击了六次按钮之后按的返回键,第一种效果必须点击六次Back键后方可退出,而第二种效果只点击一次即可退出,这就是Flag的魅力,激动….再来看Flag都有哪几种吧,此处我列在这个地方,上面两个效果中设置的是:i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);另外还有很多可以控制活动堆栈与任务栈的Flag,小马在这个地方随便列出两个,剩余的Flag值以截图的形式显示,节约时间:

  1. i.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
  2. i.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)其它:

    
Activity和Task(栈)的关系

  Task就像一个容器,而Activity就相当与填充这个容器的东西,第一个东西(Activity)则会处于最下面,最后添加的东西(Activity)则会在最低端。从Task中取出东西(Activity)则是从最顶端取出。

  二、界面跳转和服务的启动都会用到Intent,现在介绍Intent Flag是关于Activity的跳转
  Intent intent = new Intent(this,xxx.class);
  //如果activity在task存在,拿到最顶端,不会启动新的Activity
  intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
  //如果activity在task存在,将Activity之上的所有Activity结束掉
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  //默认的跳转类型,将Activity放到一个新的Task中
  intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  //如果Activity已经运行到了Task,再次跳转不会在运行这个Activity
  intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);

  大家可以很清楚的看到以后所含的标志中有针对于TASK的,对吧?指的就是任务堆栈,至于什么是任务堆栈,大家不用太过纠结于与活动堆栈之间的概念什么的,只记住一点:如果你在应用中启动Activity的时候没加任务堆栈的控制Flag时,开发环境肯定报错,而且提示的很准确 ,就是:你缺少添加任务堆栈Flag标志位,具体少了哪个标志,开发环境也会很准确的指出,必须要你添加才可正常编译通过!下面列下小马犯的错误,就是在一个Activity找到一个amr录音文件,直接以下面的方式启动去播放录音,猛报错:
   
  1. Intent i = new Intent(Intent.ACTION_VIEW); 
  2.       i.putExtra("filePath",path); 
  3.      startActivity(i); 

       如果加了 i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);操作下任务堆栈就可以了,具体的原因,也可以用一句话来总结:如果在一个Activity中同一时间,要操作不用的功能,比如:跳转时还要操作视频录音文件的播放什么的,都得设置新的任务栈来启动打开,如果不启动新任务栈的话,有时候会无原无故的显示空白还不报错!上面的错只是一个小点,小到可以忽略不讲,写在这是提醒大家,该加的时候必须加Flag,至于什么时候加,大家可以参照下官方的文档及下面小马贴出的官方文档中解释堆栈的图解,加以理解学习,如下所示:Figure2:不多解释,就是在A B 丙个任务堆栈,如果用户正在于B任务堆栈进行交互时,A在等待唤醒,反之则反

          Figure3: 下面这个就好玩了,学习了下官方的文档,讲的是:无论启动了一个新的任务堆栈或者在同一堆栈中来启动一个活动,按返回键也还是会返回到用户之前操作的Activity,如果以单例堆栈(类似单位模式)载入的话,就会在后台生成一个针对于此活动的单独的一个任务堆栈,当这个任务堆栈被唤醒到前台时,此时的返回堆栈中就包含了从前几个任务传递过来的栈顶的所有Activity,栈顶与栈底的显示关系如果下图:

            这个地方顺带着讲下,在控制活动堆栈时方式只有一种,就是直接在.java文件中setFlag,如果是控制任务堆栈的话可以以addFlag或直接在全局配置文件中添加配置的方式来控制,大家可以直接在AndroidManifest.xml文件中activity节点中添加哪下属性:taskAffinity、launchMode、allowTaskReparenting、clearTaskOnLaunch、alwaysRetainTaskState、finishOnTaskLaunch,两种控制任务堆栈的方式换汤不换药,大家看个人习惯选择使用就可以了…切记,用的时候一定搞清楚你要加的标志位是什么意思,不要看到个task就addFlag,设置Flag是为了让应用更干净,控制更严密,如果加错了标志位,应用是不会报任何错的,只是出现怪异的跳转与关闭!!!

  

Stack是一个后进先出(last in first out,LIFO)的堆栈,在Vector类的基础上扩展5个方法而来

Deque(双端队列)比起Stack具有更好的完整性和一致性,应该被优先使用

[plain] view plain copy
  1. E push(E item)   
  2.          把项压入堆栈顶部。   
  3. E pop()   
  4.          移除堆栈顶部的对象,并作为此函数的值返回该对象。   
  5. E peek()   
  6.          查看堆栈顶部的对象,但不从堆栈中移除它。   
  7. boolean empty()   
  8.          测试堆栈是否为空。    
  9. int search(Object o)   
  10.          返回对象在堆栈中的位置,以 1 为基数。  

Stack本身通过扩展Vector而来,而Vector本身是一个可增长的对象数组( a growable array of objects)那么这个数组的哪里作为Stack的栈顶,哪里作为Stack的栈底?

答案只能从源代码中寻找,jdk1.6:

  1. public class Stack<E> extends Vector<E> {  
  2.     /** 
  3.      * Creates an empty Stack. 
  4.      */  
  5.     public Stack() {  
  6.     }  
  7.   
  8.     /** 
  9.      * Pushes an item onto the top of this stack. This has exactly 
  10.      * the same effect as: 
  11.      * <blockquote><pre> 
  12.      * addElement(item)</pre></blockquote> 
  13.      * 
  14.      * @param   item   the item to be pushed onto this stack. 
  15.      * @return  the <code>item</code> argument. 
  16.      * @see     java.util.Vector#addElement 
  17.      */  
  18.     public E push(E item) {  
  19.     addElement(item);  
  20.   
  21.     return item;  
  22.     }  
  23.   
  24.     /** 
  25.      * Removes the object at the top of this stack and returns that 
  26.      * object as the value of this function. 
  27.      * 
  28.      * @return     The object at the top of this stack (the last item 
  29.      *             of the <tt>Vector</tt> object). 
  30.      * @exception  EmptyStackException  if this stack is empty. 
  31.      */  
  32.     public synchronized E pop() {  
  33.     E   obj;  
  34.     int len = size();  
  35.   
  36.     obj = peek();  
  37.     removeElementAt(len - 1);  
  38.   
  39.     return obj;  
  40.     }  
  41.   
  42.     /** 
  43.      * Looks at the object at the top of this stack without removing it 
  44.      * from the stack. 
  45.      * 
  46.      * @return     the object at the top of this stack (the last item 
  47.      *             of the <tt>Vector</tt> object). 
  48.      * @exception  EmptyStackException  if this stack is empty. 
  49.      */  
  50.     public synchronized E peek() {  
  51.     int len = size();  
  52.   
  53.     if (len == 0)  
  54.         throw new EmptyStackException();  
  55.     return elementAt(len - 1);  
  56.     }  
  57.   
  58.     /** 
  59.      * Tests if this stack is empty. 
  60.      * 
  61.      * @return  <code>true</code> if and only if this stack contains 
  62.      *          no items; <code>false</code> otherwise. 
  63.      */  
  64.     public boolean empty() {  
  65.     return size() == 0;  
  66.     }  
  67.   
  68.     /** 
  69.      * Returns the 1-based position where an object is on this stack. 
  70.      * If the object <tt>o</tt> occurs as an item in this stack, this 
  71.      * method returns the distance from the top of the stack of the 
  72.      * occurrence nearest the top of the stack; the topmost item on the 
  73.      * stack is considered to be at distance <tt>1</tt>. The <tt>equals</tt> 
  74.      * method is used to compare <tt>o</tt> to the 
  75.      * items in this stack. 
  76.      * 
  77.      * @param   o   the desired object. 
  78.      * @return  the 1-based position from the top of the stack where 
  79.      *          the object is located; the return value <code>-1</code> 
  80.      *          indicates that the object is not on the stack. 
  81.      */  
  82.     public synchronized int search(Object o) {  
  83.     int i = lastIndexOf(o);  
  84.   
  85.     if (i >= 0) {  
  86.         return size() - i;  
  87.     }  
  88.     return -1;  
  89.     }  
  90.   
  91.     /** use serialVersionUID from JDK 1.0.2 for interoperability */  
  92.     private static final long serialVersionUID = 1224463164541339165L;  
  93. }  

通过peek()方法注释The object at the top of this stack (the last item of the Vector object,可以发现数组(Vector)的最后一位即为Stack的栈顶

pop、peek以及search方法本身进行了同步

push方法调用了父类的addElement方法

empty方法调用了父类的size方法

Vector类为线程安全类

综上,Stack类为线程安全类(多个方法调用而产生的数据不一致问题属于原子性问题的范畴)

  1. public class Test {  
  2.     public static void main(String[] args) {  
  3.         Stack<String> s = new Stack<String>();  
  4.         System.out.println("------isEmpty");  
  5.         System.out.println(s.isEmpty());  
  6.         System.out.println("------push");  
  7.         s.push("1");  
  8.         s.push("2");  
  9.         s.push("3");  
  10.         Test.it(s);  
  11.         System.out.println("------pop");  
  12.         String str = s.pop();  
  13.         System.out.println(str);  
  14.         Test.it(s);  
  15.         System.out.println("------peek");  
  16.         str = s.peek();  
  17.         System.out.println(str);  
  18.         Test.it(s);  
  19.         System.out.println("------search");  
  20.         int i = s.search("2");  
  21.         System.out.println(i);  
  22.         i = s.search("1");  
  23.         System.out.println(i);  
  24.         i = s.search("none");  
  25.         System.out.println(i);  
  26.     }  
  27.       
  28.     public static void it(Stack<String> s){  
  29.         System.out.print("iterator:");  
  30.         Iterator<String> it = s.iterator();  
  31.         while(it.hasNext()){  
  32.             System.out.print(it.next()+";");  
  33.         }  
  34.         System.out.print("\n");  
  35.     }  
  36. }  

结果:

  1. ------isEmpty  
  2. true            
  3. ------push  
  4. iterator:1;2;3;    
  5. ------pop  
  6. 3       --栈顶是数组最后一个  
  7. iterator:1;2;  
  8. ------peek  
  9. 2       --pop取后删掉,peek只取不删  
  10. iterator:1;2;  
  11. ------search      
  12. 1       --以1为基数,即栈顶为1  
  13. 2       --和栈顶见的距离为2-1=1  
  14. -1      --不存在于栈中  

Stack并不要求其中保存数据的唯一性,当Stack中有多个相同的item时,调用search方法,只返回与查找对象equal并且离栈顶最近的item与栈顶间距离(见源码中search方法说明)



D:\Users\Downloads\Log\youtube\bugreport-RMX5313IN-AP3A.240905.015.A2-2025-06-19-11-34-32\bugreport-RMX5313IN-AP3A.240905.015.A2-2025-06-19-11-34-32.txt (155 hits) Line 15125: WINDOW MANAGER LAST ANR (dumpsys window lastanr) Line 116973: ------ VM TRACES AT LAST ANR (/data/anr/anr_2025-06-19-11-19-10-783: 2025-06-19 11:19:18) ------ Line 116973: ------ VM TRACES AT LAST ANR (/data/anr/anr_2025-06-19-11-19-10-783: 2025-06-19 11:19:18) ------ Line 116986: anr < Line 116996: anr < Line 117006: anr < Line 117016: anr < Line 199851: "anrV33-1" prio=5 tid=16 TimedWaiting Line 201580: at anrp.run(PG:35) Line 201676: at anrp.run(PG:35) Line 201731: at anrp.run(PG:35) Line 201752: at anrp.run(PG:35) Line 221720: ------ ANR FILES (ls -lt /data/anr/) ------ Line 221722: -rw------- 1 system system 4661511 2025-06-19 11:19 anr_2025-06-19-11-19-10-783 Line 221723: -rw------- 1 system system 5125123 2025-06-19 11:18 anr_2025-06-19-11-18-28-676 Line 221724: -rw------- 1 system system 5110113 2025-06-19 11:18 anr_2025-06-19-11-17-59-943 Line 221725: -rw------- 1 system system 5170843 2025-06-19 11:15 anr_2025-06-19-11-15-30-180 Line 221726: -rw------- 1 system system 5211710 2025-06-19 11:15 anr_2025-06-19-11-14-59-431 Line 221727: -rw------- 1 system system 5249604 2025-06-19 11:13 anr_2025-06-19-11-13-33-120 Line 221728: -rw------- 1 system system 2550071 2025-06-18 12:01 anr_2025-06-18-12-01-29-071 Line 221729: -rw------- 1 system system 2661757 2025-06-18 12:01 temp_anr_204762592841438826.txt Line 221730: -rw------- 1 system system 4501038 2025-06-18 12:01 anr_2025-06-18-12-00-54-648 Line 221731: -rw------- 1 system system 2790621 2025-06-18 12:00 temp_anr_6131620412329269920.txt Line 221732: -rw------- 1 system system 4774064 2025-06-18 12:00 anr_2025-06-18-12-00-30-005 Line 221733: -rw------- 1 system system 2962603 2025-06-18 12:00 temp_anr_4436968846206332345.txt Line 221734: -rw------- 1 system system 4909259 2025-06-18 12:00 anr_2025-06-18-12-00-06-676 Line 221735: -rw------- 1 system system 5561152 2025-06-18 11:59 anr_2025-06-18-11-59-15-525 Line 221736: -rw------- 1 system system 2486347 2025-06-18 11:58 anr_2025-06-18-11-58-50-107 Line 221737: -rw------- 1 system system 2513502 2025-06-18 11:58 temp_anr_7627520979123128223.txt Line 221738: -rw------- 1 system system 2547664 2025-06-18 11:58 temp_anr_7306873162887901303.txt Line 221739: -rw------- 1 system system 4468182 2025-06-18 11:58 anr_2025-06-18-11-58-19-450 Line 221740: -rw------- 1 system system 5457289 2025-06-18 11:56 anr_2025-06-18-11-56-37-891 Line 221741: -rw------- 1 system system 1325229 2025-06-18 11:54 anr_2025-06-18-11-53-47-163 Line 221742: -rw------- 1 system system 5504454 2025-06-18 11:52 anr_2025-06-18-11-52-01-409 Line 239615: backstage_power/android.app.gate_fgs_timeout_anr_behavior: READ_ONLY + DISABLED (system), DISABLED (device_config) Line 240829: system_performance/com.android.server.utils.anr_timer_freezer: READ_ONLY + DISABLED (system), DISABLED (device_config) Line 240830: system_performance/com.android.server.utils.anr_timer_service: READ_ONLY + DISABLED (system), DISABLED (device_config) Line 259422: service_start_foreground_anr_delay_ms=10000 Line 259437: short_fgs_anr_extra_wait_duration=10000 Line 288694: ACTIVITY MANAGER LAST ANR (dumpsys activity lastanr) Line 300808: importance=400 pss=0.00 rss=0.00 description=bg anr: Input dispatching timed out (Application does not have a focused window). state=empty trace=/data/system/procexitstore/anr_2025-06-18-11-53-47-163.gz Line 300808: importance=400 pss=0.00 rss=0.00 description=bg anr: Input dispatching timed out (Application does not have a focused window). state=empty trace=/data/system/procexitstore/anr_2025-06-18-11-53-47-163.gz Line 307584: importance=230 pss=0.00 rss=347MB description=user request after error: No response to onStartJob state=empty trace=/data/system/procexitstore/anr_2025-06-19-11-19-10-783.gz Line 307588: importance=230 pss=0.00 rss=483MB description=remove task state=empty trace=/data/system/procexitstore/anr_2025-06-19-11-17-59-943.gz Line 307604: importance=230 pss=0.00 rss=452MB description=user request after error: Input dispatching timed out (8b6aa1e com.google.android.youtube/com.google.android.youtube.app.honeycomb.Shell$HomeActivity (server) is not responding. Waited 5001ms for FocusEvent(hasFocus=true)). state=empty trace=/data/system/procexitstore/anr_2025-06-19-11-15-30-180.gz Line 307608: importance=100 pss=0.00 rss=0.00 description=user request after error: Input dispatching timed out (96080e6 com.google.android.youtube/com.google.android.youtube.app.honeycomb.Shell$HomeActivity (server) is not responding. Waited 5000ms for FocusEvent(hasFocus=true)). state=empty trace=/data/system/procexitstore/anr_2025-06-19-11-14-59-431.gz Line 437707: Job Completions com.coloros.gallery3d/com.oplus.gallery.framework.abilities.scan.manager.GalleryScanService: successful_finish(7x) anr(1x) Line 437719: 11 starts, 1 anrs Line 439978: Job Completions @androidx.work.systemjobscheduler@com.google.android.youtube/androidx.work.impl.background.systemjob.SystemJobService: unknown:-1(1x) canceled(14x) successful_finish(24x) anr(1x) Line 439989: 15 starts, 6 anrs Line 441158: Job Completions in.mohalla.sharechat/androidx.work.impl.background.systemjob.SystemJobService: canceled(5x) successful_finish(6x) anr(9x) Line 441159: Job Completions in.mohalla.sharechat/com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService: successful_finish(3x) anr(6x) Line 473593: backstage_power/android.app.gate_fgs_timeout_anr_behavior=false Line 475571: system_performance/com.android.server.utils.anr_timer_freezer=false Line 475572: system_performance/com.android.server.utils.anr_timer_service=false Line 476935: 2025-06-17 11:36:45 system_app_anr (compressed text, 232873 bytes) Line 476936: 2025-06-17 11:37:09 system_app_anr (compressed text, 201571 bytes) Line 476937: 2025-06-17 11:40:22 system_app_anr (compressed text, 222123 bytes) Line 476938: 2025-06-17 11:41:13 system_app_anr (compressed text, 185557 bytes) Line 476939: 2025-06-17 11:41:38 system_app_anr (compressed text, 241609 bytes) Line 476940: 2025-06-17 11:42:13 system_app_anr (compressed text, 248915 bytes) Line 476941: 2025-06-17 11:54:53 system_app_anr (compressed text, 167694 bytes) Line 476942: 2025-06-17 11:55:43 system_app_anr (compressed text, 190039 bytes) Line 476943: 2025-06-17 11:58:39 system_app_anr (compressed text, 245539 bytes) Line 476944: 2025-06-17 12:17:04 system_app_anr (compressed text, 214445 bytes) Line 476945: 2025-06-17 12:22:01 system_app_anr (compressed text, 241492 bytes) Line 476947: 2025-06-18 11:52:20 system_app_anr (compressed text, 260400 bytes) Line 476948: 2025-06-18 11:54:13 system_app_anr (compressed text, 196046 bytes) Line 476949: 2025-06-18 11:57:01 system_app_anr (compressed text, 245540 bytes) Line 476950: 2025-06-18 11:58:36 system_app_anr (compressed text, 256724 bytes) Line 476951: 2025-06-18 11:58:53 system_app_anr (compressed text, 83697 bytes) Line 476952: 2025-06-18 11:59:29 system_app_anr (compressed text, 255379 bytes) Line 476953: 2025-06-18 12:00:19 system_app_anr (compressed text, 248849 bytes) Line 476959: 2025-06-19 11:13:43 system_app_anr (compressed text, 238808 bytes) Line 476960: 2025-06-19 11:15:08 system_app_anr (compressed text, 236177 bytes) Line 476961: 2025-06-19 11:15:37 system_app_anr (compressed text, 220894 bytes) Line 476962: 2025-06-19 11:18:08 system_app_anr (compressed text, 223886 bytes) Line 476963: 2025-06-19 11:18:36 system_app_anr (compressed text, 218263 bytes) Line 476964: 2025-06-19 11:19:19 system_app_anr (compressed text, 236600 bytes) Line 483662: es_u_anr_count=3 Line 483663: es_u_anr_window_ms=21600000 Line 483780: <0>com.google.android.youtube::anr: Line 483792: <0>in.mohalla.sharechat::anr: Line 483836: <0>com.google.android.apps.subscriptions.red::anr: Line 483844: <0>com.google.android.youtube::anr: Line 483852: <0>com.google.android.googlequicksearchbox::anr: Line 483858: <0>com.android.providers.calendar::anr: Line 483868: <0>com.android.providers.downloads::anr: Line 483876: <0>com.google.android.apps.messaging::anr: Line 483884: <0>com.oplus.sau::anr: Line 483892: <0>com.heytap.market::anr: Line 483900: <0>com.google.android.configupdater::anr: Line 483908: <0>com.google.android.providers.media.module::anr: Line 483916: <0>com.google.android.apps.safetyhub::anr: Line 483924: <0>in.mohalla.sharechat::anr: Line 483932: <0>com.android.vending::anr: Line 483942: <0>com.google.android.adservices.api::anr: Line 483950: <0>android::anr: Line 483958: <0>com.android.launcher3::anr: Line 483966: <0>com.instagram.android::anr: Line 483974: <0>com.google.android.deskclock::anr: Line 483982: <0>com.google.android.as::anr: Line 483990: <0>com.google.android.gm::anr: Line 484000: <0>com.google.android.apps.tachyon::anr: Line 484008: <0>com.google.android.permissioncontroller::anr: Line 484014: <0>com.google.android.setupwizard::anr: Line 484022: <0>com.android.providers.settings::anr: Line 484030: <0>com.facebook.services::anr: Line 484038: <0>com.google.android.as.oss::anr: Line 484046: <0>com.google.android.apps.wellbeing::anr: Line 484054: <0>com.google.android.dialer::anr: Line 484062: <0>com.google.android.apps.nbu.files::anr: Line 484070: <0>com.google.android.apps.docs::anr: Line 484078: <0>com.google.android.apps.maps::anr: Line 484086: <0>com.google.android.webview::anr: Line 484094: <0>com.coloros.weather2::anr: Line 484102: <0>com.google.android.networkstack::anr: Line 484110: <0>com.google.android.rkpdapp::anr: Line 484118: <0>com.google.android.contacts::anr: Line 484126: <0>com.android.chrome::anr: Line 484134: <0>com.nearme.gamecenter::anr: Line 484142: <0>com.nearme.statistics.rom::anr: Line 484150: <0>com.google.android.gms::anr: Line 484158: <0>com.google.android.tts::anr: Line 484166: <0>com.google.android.apps.walletnfcrel::anr: Line 484174: <0>com.google.android.partnersetup::anr: Line 484182: <0>com.google.android.videos::anr: Line 484190: <0>com.coloros.lockassistant::anr: Line 484200: <0>com.google.android.apps.photos::anr: Line 484208: <0>com.google.android.calendar::anr: Line 484218: <0>com.facebook.katana::anr: Line 484226: <0>com.coloros.phonemanager::anr: Line 484234: <0>com.android.imsserviceentitlement::anr: Line 484242: <0>com.android.settings::anr: Line 484250: <0>com.fitbit.FitbitMobile::anr: Line 484258: <0>com.grofers.customerapp::anr: Line 484266: <0>com.myntra.android::anr: Line 484274: <0>com.google.android.apps.turbo::anr: Line 484282: <0>com.oplus.lfeh::anr: Line 484288: <0>com.google.android.apps.carrier.carrierwifi::anr: Line 484298: <0>com.oppo.quicksearchbox::anr: Line 484306: <0>com.google.android.apps.youtube.music::anr: Line 484314: <0>com.facebook.appmanager::anr: Line 484322: <0>com.coloros.gallery3d::anr: Line 484330: <0>com.snapchat.android::anr: Line 484340: <0>com.google.android.inputmethod.latin::anr: Line 484348: <0>com.glance.internet::anr: Line 484354: <0>com.google.android.apps.restore::anr: Line 484363: Category{anr}: 3 events in +6h0m0s0ms Line 506990: 4x unknown:-1, 38x canceled, 82x successful_finish, 1x anr Line 544392: com.unisoc.traceur.anrstartdumpperfetto: Line 546673: com.unisoc.traceur.anrsavedumpperfetto: Line 708996: _id:585 name:anr_show_background pkg:com.android.settings value:0 default:0 defaultSystemSet:true Line 709073: _id:275 name:dropbox:data_app_anr pkg:com.google.android.gms value:disabled Line 709643: setting: anr_show_background generation:2
最新发布
07-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值