Android 发生ANR时候在traces根本发现不了哪里错了,求解答

App里面Log日志报的ANR错:

11-09 16:46:42.739: E/ActivityManager(1309): ANR in com.dingdingpai.paybox (com.dingdingpai.paybox/com.zftpay.paybox.activity.acquirer.nearby.NearByPaySucAct)
11-09 16:46:42.739: E/ActivityManager(1309): PID: 28531
11-09 16:46:42.739: E/ActivityManager(1309): Reason: Input dispatching timed out (Waiting because the touched window has not finished processing the input events that were previously delivered to it.)
11-09 16:46:42.739: E/ActivityManager(1309): Load: 19.43 / 18.81 / 18.84
11-09 16:46:42.739: E/ActivityManager(1309): CPU usage from 36891ms to 0ms ago with 99% awake:
11-09 16:46:42.739: E/ActivityManager(1309): 86% 28531/com.dingdingpai.paybox: 82% user + 3.9% kernel / faults: 179 minor 29 major
11-09 16:46:42.739: E/ActivityManager(1309): 2% 406/adbd: 0.1% user + 1.9% kernel / faults: 1549 minor
11-09 16:46:42.739: E/ActivityManager(1309): 1.1% 213/mediaserver: 0% user + 1.1% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0.9% 1695/android.process.media: 0.4% user + 0.4% kernel / faults: 1 minor
11-09 16:46:42.739: E/ActivityManager(1309): 0.8% 1309/system_server: 0.5% user + 0.2% kernel / faults: 853 minor 36 major
11-09 16:46:42.739: E/ActivityManager(1309): 0.6% 2623/mpdecision: 0% user + 0.6% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0.4% 20721/kworker/0:2H: 0% user + 0.4% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0.4% 1457/com.android.systemui: 0.2% user + 0.1% kernel / faults: 1467 minor 532 major
11-09 16:46:42.739: E/ActivityManager(1309): 0.3% 127/w1_bus_master1: 0% user + 0.3% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0.2% 25402/com.xiaomi.gamecenter: 0% user + 0.2% kernel / faults: 4 minor 1 major
11-09 16:46:42.739: E/ActivityManager(1309): 0.1% 1784/com.android.phone: 0.1% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0.1% 2248/com.miui.securitycenter.remote: 0.1% user + 0% kernel / faults: 1244 minor 96 major
11-09 16:46:42.739: E/ActivityManager(1309): 0.1% 25659/kworker/0:3H: 0% user + 0.1% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0.1% 3/ksoftirqd/0: 0% user + 0.1% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0.1% 30244/kworker/0:2: 0% user + 0.1% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 7/kworker/u:0H: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 26627/logcat: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 30827/kworker/u:4: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 155/mmcqd/0: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 200/servicemanager: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 210/surfaceflinger: 0% user + 0% kernel / faults: 1 minor 1 major
11-09 16:46:42.739: E/ActivityManager(1309): 0% 402/thermal-engine: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 13894/wpa_supplicant: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 30833/kworker/u:12: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 2/kthreadd: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 33/kworker/u:1H: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 222/qrngd: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 336/sdcard: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 400/location-mq: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 821/mdss_fb0: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 1741/com.sohu.inputmethod.sogou.xiaomi: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 1827/com.miui.whetstone: 0% user + 0% kernel / faults: 4 minor
11-09 16:46:42.739: E/ActivityManager(1309): 0% 1860/com.miui.home: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 2138/com.miui.powerkeeper:service: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 2226/com.miui.networkassistant.deamon: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 2590/mcd: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 2957/sogou.mobile.explorer.hotwords: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 13881/MC_Thread: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 0% 13883/RX_Thread: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31241/migration/1: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31242/kworker/1:0: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31243/kworker/1:0H: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31244/ksoftirqd/1: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31254/kworker/1:1: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31433/kworker/1:1H: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31434/kworker/0:1H: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31437/kworker/1:2H: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 55% TOTAL: 49% user + 6% kernel + 0% iowait + 0% softirq
11-09 16:46:42.739: E/ActivityManager(1309): CPU usage from 2259ms to 2795ms later:
11-09 16:46:42.739: E/ActivityManager(1309): 108% 28531/com.dingdingpai.paybox: 107% user + 1.7% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 16% 30950/Thread-1615: 16% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 14% 31058/Thread-1623: 14% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 14% 31096/Thread-1627: 14% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 14% 31176/Thread-1631: 12% user + 1.7% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 12% 30866/Thread-1612: 12% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 12% 31043/Thread-1621: 12% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 12% 31089/Thread-1625: 12% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 12% 31119/Thread-1629: 12% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 1.7% 28554/FileObserver: 1.7% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 7.2% 1309/system_server: 5.4% user + 1.8% kernel / faults: 1 minor
11-09 16:46:42.739: E/ActivityManager(1309): 7.2% 1338/ActivityManager: 3.6% user + 3.6% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 1.8% 213/mediaserver: 0% user + 1.8% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 1.8% 406/adbd: 0% user + 1.8% kernel / faults: 32 minor
11-09 16:46:42.739: E/ActivityManager(1309): 1.8% 406/adbd: 0% user + 1.8% kernel
11-09 16:46:42.739: E/ActivityManager(1309): +0% 31531/adbd: 0% user + 0% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 1.3% 31244/ksoftirqd/1: 0% user + 1.3% kernel
11-09 16:46:42.739: E/ActivityManager(1309): 43% TOTAL: 39% user + 3.4% kernel

然后我在traces文件里面去找PID: 28531的根本发现不了什么错

单独拉出来PID=28531的拉出来如下:

"Thread-1633" prio=5 tid=1 VMWAIT
| group="main" sCount=1 dsCount=0 obj=0x42b18010 self=0x416f4860
| sysTid=28531 nice=0 sched=0/0 cgrp=apps handle=1074823508
| state=S schedstat=( 23570772482 18096225770 108042 ) utm=1866 stm=491 core=0
#00 pc 00021a98 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f034 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 0004d663 /system/lib/libdvm.so
#04 pc 0003cd0d /system/lib/libdvm.so
#05 pc 0004f255 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*, bool)+420)
#06 pc 00001063 /system/bin/app_process
#07 pc 0000e4bb /system/lib/libc.so (__libc_init+50)
#08 pc 00000d80 /system/bin/app_process
at dalvik.system.NativeStart.run(Native Method)

但是根本不知道是哪里报错了啊,好纠结啊,用了腾讯的bugly也根本不行啊,有点崩溃,哪位大神给看下到底出错了啊,拜谢

下面是pid=28531的全部traces日志:

----- pid 28531 at 2016-11-09 16:46:39 -----
Cmd line: com.dingdingpai.paybox

JNI: CheckJNI is off; workarounds are off; pins=1; globals=498

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)

"Thread-1631" prio=5 tid=26 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x42b0e968 self=0x62c1cec8
| sysTid=31176 nice=0 sched=0/0 cgrp=apps handle=1656772904
| state=S schedstat=( 3633299697 1606457029 4432 ) utm=337 stm=26 core=1
at java.lang.VMThread.sleep(Native Method)
at java.lang.Thread.sleep(Thread.java:1013)
at java.lang.Thread.sleep(Thread.java:995)
at com.zftpay.paybox.widget.customsialog.LoadingDialogView$UpdataThread.run(LoadingDialogView.java:111)
at java.lang.Thread.run(Thread.java:841)

"Thread-1633" prio=5 tid=1 VMWAIT
| group="main" sCount=1 dsCount=0 obj=0x42b18010 self=0x416f4860
| sysTid=28531 nice=0 sched=0/0 cgrp=apps handle=1074823508
| state=S schedstat=( 23570772482 18096225770 108042 ) utm=1866 stm=491 core=0
#00 pc 00021a98 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f034 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 0004d663 /system/lib/libdvm.so
#04 pc 0003cd0d /system/lib/libdvm.so
#05 pc 0004f255 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*, bool)+420)
#06 pc 00001063 /system/bin/app_process
#07 pc 0000e4bb /system/lib/libc.so (__libc_init+50)
#08 pc 00000d80 /system/bin/app_process
at dalvik.system.NativeStart.run(Native Method)

"Thread-1629" prio=5 tid=34 SUSPENDED
| group="main" sCount=1 dsCount=0 obj=0x424ef5a0 self=0x61f39890
| sysTid=31119 nice=0 sched=0/0 cgrp=apps handle=1621144376
| state=S schedstat=( 3689865326 1726587225 4851 ) utm=343 stm=25 core=1
#00 pc 00021a98 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f034 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 0005655f /system/lib/libdvm.so
#04 pc 00056b21 /system/lib/libdvm.so (dvmChangeStatus(Thread*, ThreadStatus)+34)
#05 pc 00055c81 /system/lib/libdvm.so
#06 pc 00055ce7 /system/lib/libdvm.so (dvmThreadSleep(unsigned long long, unsigned int)+62)
#07 pc 00000214 /dev/ashmem/dalvik-jit-code-cache (deleted)
at java.lang.VMThread.sleep(Native Method)
at java.lang.Thread.sleep(Thread.java:1013)
at java.lang.Thread.sleep(Thread.java:995)
at com.zftpay.paybox.widget.customsialog.LoadingDialogView$UpdataThread.run(LoadingDialogView.java:111)
at java.lang.Thread.run(Thread.java:841)

"Thread-1627" prio=5 tid=33 MONITOR
| group="main" sCount=1 dsCount=0 obj=0x428e4638 self=0x61f1c890
| sysTid=31096 nice=0 sched=0/0 cgrp=apps handle=1643236584
| state=S schedstat=( 3674041640 1764672973 5137 ) utm=332 stm=35 core=1
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:~318)

  • waiting to lock (a android.os.MessageQueue) held by tid=30 (Thread-1623) at android.os.Handler.enqueueMessage(Handler.java:626) at android.os.Handler.sendMessageAtTime(Handler.java:595) at android.os.Handler.sendMessageDelayed(Handler.java:566) at android.os.Handler.sendEmptyMessageDelayed(Handler.java:530) at android.os.Handler.sendEmptyMessage(Handler.java:515) at com.zftpay.paybox.widget.customsialog.LoadingDialogView$UpdataThread.run(LoadingDialogView.java:112) at java.lang.Thread.run(Thread.java:841)

"Thread-1625" prio=5 tid=32 MONITOR
| group="main" sCount=1 dsCount=0 obj=0x424e1200 self=0x61ee9860
| sysTid=31089 nice=0 sched=0/0 cgrp=apps handle=1643027640
| state=S schedstat=( 3708275048 1726739259 5283 ) utm=337 stm=33 core=1
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:~318)

  • waiting to lock (a android.os.MessageQueue) held by tid=30 (Thread-1623) at android.os.Handler.enqueueMessage(Handler.java:626) at android.os.Handler.sendMessageAtTime(Handler.java:595) at android.os.Handler.sendMessageDelayed(Handler.java:566) at android.os.Handler.sendEmptyMessageDelayed(Handler.java:530) at android.os.Handler.sendEmptyMessage(Handler.java:515) at com.zftpay.paybox.widget.customsialog.LoadingDialogView$UpdataThread.run(LoadingDialogView.java:112) at java.lang.Thread.run(Thread.java:841)

"Thread-1623" prio=5 tid=30 SUSPENDED
| group="main" sCount=1 dsCount=0 obj=0x426c2158 self=0x62c222b8
| sysTid=31058 nice=0 sched=0/0 cgrp=apps handle=1656829440
| state=S schedstat=( 3700224020 1786775127 5578 ) utm=344 stm=26 core=1
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:~343)
at android.os.Handler.enqueueMessage(Handler.java:626)
at android.os.Handler.sendMessageAtTime(Handler.java:595)
at android.os.Handler.sendMessageDelayed(Handler.java:566)
at android.os.Handler.sendEmptyMessageDelayed(Handler.java:530)
at android.os.Handler.sendEmptyMessage(Handler.java:515)
at com.zftpay.paybox.widget.customsialog.LoadingDialogView$UpdataThread.run(LoadingDialogView.java:112)
at java.lang.Thread.run(Thread.java:841)

"Thread-1621" prio=5 tid=29 MONITOR
| group="main" sCount=1 dsCount=0 obj=0x42b37f08 self=0x62c5c1d0
| sysTid=31043 nice=0 sched=0/0 cgrp=apps handle=1621199688
| state=S schedstat=( 3730750307 1943187029 5817 ) utm=347 stm=26 core=1
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:~318)

  • waiting to lock (a android.os.MessageQueue) held by tid=30 (Thread-1623) at android.os.Handler.enqueueMessage(Handler.java:626) at android.os.Handler.sendMessageAtTime(Handler.java:595) at android.os.Handler.sendMessageDelayed(Handler.java:566) at android.os.Handler.sendEmptyMessageDelayed(Handler.java:530) at android.os.Handler.sendEmptyMessage(Handler.java:515) at com.zftpay.paybox.widget.customsialog.LoadingDialogView$UpdataThread.run(LoadingDialogView.java:112) at java.lang.Thread.run(Thread.java:841)

"AudioRecord" prio=10 tid=28 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x424969d0 self=0x62c207d0
| sysTid=30963 nice=-16 sched=0/0 cgrp=apps handle=1621178400
| state=S schedstat=( 4357705 17892868 76 ) utm=0 stm=0 core=0
#00 pc 00021a9c /system/lib/libc.so (__futex_syscall3+12)
#01 pc 0000f034 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 00051bbd /system/lib/libmedia.so (android::AudioRecord::AudioRecordThread::threadLoop()+100)
#03 pc 0000ea4d /system/lib/libutils.so (android::Thread::_threadLoop(void*)+104)
#04 pc 0004e485 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
#05 pc 0000e5ef /system/lib/libutils.so
#06 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#07 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

"Thread-1615" prio=5 tid=25 SUSPENDED
| group="main" sCount=1 dsCount=0 obj=0x42b044e0 self=0x62c6ae78
| sysTid=30950 nice=0 sched=0/0 cgrp=apps handle=1615996768
| state=S schedstat=( 8791873112 4710523269 7727 ) utm=851 stm=28 core=1
#00 pc 00021a98 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f034 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 0005655f /system/lib/libdvm.so
#04 pc 00056b21 /system/lib/libdvm.so (dvmChangeStatus(Thread*, ThreadStatus)+34)
#05 pc 0004c3b3 /system/lib/libdvm.so
#06 pc 0004e073 /system/lib/libdvm.so
#07 pc 00083623 /system/lib/libandroid_runtime.so
#08 pc 0008365b /system/lib/libandroid_runtime.so
#09 pc 0002034c /system/lib/libdvm.so (dvmPlatformInvoke+112)
#10 pc 00050fcf /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
#11 pc 00000214 /dev/ashmem/dalvik-jit-code-cache (deleted)
at android.media.AudioRecord.native_read_in_short_array(Native Method)
at android.media.AudioRecord.read(AudioRecord.java:663)
at com.tuner168.ble_bracelet_sim.audio.RecognizeThread.run(RecognizeThread.java:102)

"Timer-2" prio=5 tid=20 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x42b1baf8 self=0x6057c798
| sysTid=30909 nice=0 sched=0/0 cgrp=apps handle=1621135960
| state=S schedstat=( 20484377 5202030 40 ) utm=2 stm=0 core=0
at java.lang.Object.wait(Native Method)

  • waiting on (a java.util.Timer$TimerImpl) at java.lang.Object.wait(Object.java:401) at java.util.Timer$TimerImpl.run(Timer.java:238)

"pool-3-thread-2" prio=5 tid=24 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x4292c330 self=0x6057d638
| sysTid=30867 nice=0 sched=0/0 cgrp=apps handle=1658670960
| state=S schedstat=( 32660106 13747029 65 ) utm=3 stm=0 core=1
at java.lang.Object.wait(Native Method)

  • waiting on (a java.lang.VMThread) held by tid=24 (pool-3-thread-2) at java.lang.Thread.parkFor(Thread.java:1205) at sun.misc.Unsafe.park(Unsafe.java:325) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197) at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:429) at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:331) at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:910) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)

"Thread-1612" prio=5 tid=23 MONITOR
| group="main" sCount=1 dsCount=0 obj=0x42927908 self=0x62dd56c0
| sysTid=30866 nice=0 sched=0/0 cgrp=apps handle=1656995496
| state=S schedstat=( 3839698317 1806337748 7682 ) utm=350 stm=33 core=1
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:~318)

  • waiting to lock (a android.os.MessageQueue) held by tid=30 (Thread-1623) at android.os.Handler.enqueueMessage(Handler.java:626) at android.os.Handler.sendMessageAtTime(Handler.java:595) at android.os.Handler.sendMessageDelayed(Handler.java:566) at android.os.Handler.sendEmptyMessageDelayed(Handler.java:530) at android.os.Handler.sendEmptyMessage(Handler.java:515) at com.zftpay.paybox.widget.customsialog.LoadingDialogView$UpdataThread.run(LoadingDialogView.java:112) at java.lang.Thread.run(Thread.java:841)

"RefQueueWorker@org.apache.http.impl.conn.tsccm.ConnPoolByRoute@428b4460" daemon prio=5 tid=19 WAIT
| group="main" sCount=1 dsCount=0 obj=0x428b72f8 self=0x62c0a5d8
| sysTid=30852 nice=0 sched=0/0 cgrp=apps handle=1616152720
| state=S schedstat=( 305990 46979 6 ) utm=0 stm=0 core=2
at java.lang.Object.wait(Native Method)

  • waiting on (a java.lang.ref.ReferenceQueue) at java.lang.Object.wait(Object.java:401) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73) at org.apache.http.impl.conn.tsccm.RefQueueWorker.run(RefQueueWorker.java:102) at java.lang.Thread.run(Thread.java:841)

"CommunicationWithDeviceThread" prio=5 tid=21 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x427db388 self=0x60517ec0
| sysTid=28580 nice=0 sched=0/0 cgrp=apps handle=1615950296
| state=S schedstat=( 281667 0 2 ) utm=0 stm=0 core=0
#00 pc 000218d0 /system/lib/libc.so (epoll_wait+12)
#01 pc 0001081b /system/lib/libutils.so (android::Looper::pollInner(int)+98)
#02 pc 00010a45 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
#03 pc 0006bb19 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
#04 pc 0002034c /system/lib/libdvm.so (dvmPlatformInvoke+112)
#05 pc 00050fcf /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
#06 pc 000297e0 /system/lib/libdvm.so
#07 pc 00030c6c /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
#08 pc 0002e304 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#09 pc 00063431 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
#10 pc 00063455 /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
#11 pc 00058133 /system/lib/libdvm.so
#12 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#13 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:138)
at android.os.Looper.loop(Looper.java:123)
at android.os.HandlerThread.run(HandlerThread.java:61)

"Binder_4" prio=5 tid=18 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4266e1c8 self=0x60525cf0
| sysTid=28564 nice=0 sched=0/0 cgrp=apps handle=1616009896
| state=S schedstat=( 17960418 45819164 121 ) utm=1 stm=0 core=3
#00 pc 0002071c /system/lib/libc.so (__ioctl+8)
#01 pc 0002cf83 /system/lib/libc.so (ioctl+14)
#02 pc 0001d471 /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
#03 pc 0001db7b /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
#04 pc 0001dc11 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
#05 pc 00021a89 /system/lib/libbinder.so
#06 pc 0000eabd /system/lib/libutils.so (android::Thread::_threadLoop(void*)+216)
#07 pc 0004e485 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
#08 pc 0000e5ef /system/lib/libutils.so
#09 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#10 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

"WifiManager" prio=5 tid=17 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x42573cd8 self=0x60524008
| sysTid=28561 nice=0 sched=0/0 cgrp=apps handle=1616004192
| state=S schedstat=( 17615048 65286354 145 ) utm=0 stm=1 core=0
#00 pc 000218d0 /system/lib/libc.so (epoll_wait+12)
#01 pc 0001081b /system/lib/libutils.so (android::Looper::pollInner(int)+98)
#02 pc 00010a45 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
#03 pc 0006bb19 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
#04 pc 0002034c /system/lib/libdvm.so (dvmPlatformInvoke+112)
#05 pc 00050fcf /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
#06 pc 00000214 /dev/ashmem/dalvik-jit-code-cache (deleted)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:138)
at android.os.Looper.loop(Looper.java:123)
at android.os.HandlerThread.run(HandlerThread.java:61)

"Binder_3" prio=5 tid=16 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x425317f8 self=0x60514010
| sysTid=28559 nice=0 sched=0/0 cgrp=apps handle=1615936968
| state=S schedstat=( 17389168 46019273 138 ) utm=0 stm=1 core=3
#00 pc 0002071c /system/lib/libc.so (__ioctl+8)
#01 pc 0002cf83 /system/lib/libc.so (ioctl+14)
#02 pc 0001d471 /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
#03 pc 0001db7b /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
#04 pc 0001dc11 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
#05 pc 00021a89 /system/lib/libbinder.so
#06 pc 0000eabd /system/lib/libutils.so (android::Thread::_threadLoop(void*)+216)
#07 pc 0004e485 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
#08 pc 0000e5ef /system/lib/libutils.so
#09 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#10 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

"java.lang.ProcessManager" daemon prio=5 tid=15 WAIT
| group="main" sCount=1 dsCount=0 obj=0x4252fd28 self=0x60513768
| sysTid=28557 nice=0 sched=0/0 cgrp=apps handle=1615934240
| state=S schedstat=( 5171247 879583 37 ) utm=0 stm=0 core=1
at java.lang.Object.wait(Native Method)

  • waiting on (a java.util.HashMap) at java.lang.Object.wait(Object.java:364) at java.lang.ProcessManager.waitForMoreChildren(ProcessManager.java:140) at java.lang.ProcessManager.watchChildren(ProcessManager.java:105) at java.lang.ProcessManager.access$000(ProcessManager.java:40) at java.lang.ProcessManager$1.run(ProcessManager.java:58)

"FileObserver" prio=5 tid=14 SUSPENDED
| group="main" sCount=1 dsCount=0 obj=0x424c8d30 self=0x5f551718
| sysTid=28554 nice=0 sched=0/0 cgrp=apps handle=1616506096
| state=S schedstat=( 2674007 4621617 16 ) utm=0 stm=0 core=0
at java.lang.StackTraceElement.(StackTraceElement.java:~61)
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:579)
at java.lang.Thread.getAllStackTraces(Thread.java:521)
at com.tencent.bugly.proguard.a.a(BUGLY:943)
at com.tencent.bugly.crashreport.crash.anr.b.a(BUGLY:395)
at com.tencent.bugly.crashreport.crash.anr.b$1.onEvent(BUGLY:462)
at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:125)
at android.os.FileObserver$ObserverThread.observe(Native Method)
at android.os.FileObserver$ObserverThread.run(FileObserver.java:88)

"BUGLY_THREAD" prio=5 tid=12 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x42491a18 self=0x60297378
| sysTid=28553 nice=0 sched=0/0 cgrp=apps handle=1599414472
| state=S schedstat=( 13214376 14080415 57 ) utm=1 stm=0 core=0
at java.lang.Object.wait(Native Method)

  • waiting on (a java.lang.VMThread) held by tid=12 (BUGLY_THREAD) at java.lang.Thread.parkFor(Thread.java:1205) at sun.misc.Unsafe.park(Unsafe.java:325) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2056) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1062) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:778) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)

"BUGLY_THREAD" prio=5 tid=13 WAIT
| group="main" sCount=1 dsCount=0 obj=0x4248fea8 self=0x6028f940
| sysTid=28552 nice=0 sched=0/0 cgrp=apps handle=1613299096
| state=S schedstat=( 109396885 61975669 283 ) utm=3 stm=7 core=2
at java.lang.Object.wait(Native Method)

  • waiting on (a java.lang.VMThread) held by tid=13 (BUGLY_THREAD) at java.lang.Thread.parkFor(Thread.java:1205) at sun.misc.Unsafe.park(Unsafe.java:325) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1057) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:778) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)

"BUGLY_THREAD" prio=5 tid=11 WAIT
| group="main" sCount=1 dsCount=0 obj=0x4247f7d8 self=0x5f550d68
| sysTid=28550 nice=0 sched=0/0 cgrp=apps handle=1599410624
| state=S schedstat=( 25886336 22998661 313 ) utm=1 stm=1 core=0
at java.lang.Object.wait(Native Method)

  • waiting on (a java.lang.VMThread) held by tid=11 (BUGLY_THREAD) at java.lang.Thread.parkFor(Thread.java:1205) at sun.misc.Unsafe.park(Unsafe.java:325) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1057) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:778) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)

"Binder_2" prio=5 tid=10 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4244dec0 self=0x5f4d4008
| sysTid=28545 nice=0 sched=0/0 cgrp=apps handle=1596783464
| state=S schedstat=( 19653653 26620362 131 ) utm=1 stm=0 core=3
#00 pc 0002071c /system/lib/libc.so (__ioctl+8)
#01 pc 0002cf83 /system/lib/libc.so (ioctl+14)
#02 pc 0001d471 /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
#03 pc 0001db7b /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
#04 pc 0001dc11 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
#05 pc 00021a89 /system/lib/libbinder.so
#06 pc 0000eabd /system/lib/libutils.so (android::Thread::_threadLoop(void*)+216)
#07 pc 0004e485 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
#08 pc 0000e5ef /system/lib/libutils.so
#09 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#10 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

"Binder_1" prio=5 tid=9 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4244dd20 self=0x5f2cf250
| sysTid=28544 nice=0 sched=0/0 cgrp=apps handle=1596780552
| state=S schedstat=( 17057920 52076197 126 ) utm=1 stm=0 core=3
#00 pc 0002071c /system/lib/libc.so (__ioctl+8)
#01 pc 0002cf83 /system/lib/libc.so (ioctl+14)
#02 pc 0001d471 /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
#03 pc 0001db7b /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
#04 pc 0001dc11 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
#05 pc 00021a89 /system/lib/libbinder.so
#06 pc 0000eabd /system/lib/libutils.so (android::Thread::_threadLoop(void*)+216)
#07 pc 0004e485 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
#08 pc 0000e5ef /system/lib/libutils.so
#09 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#10 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

"FinalizerWatchdogDaemon" daemon prio=5 tid=8 WAIT
| group="system" sCount=1 dsCount=0 obj=0x424487f0 self=0x5bde28b0
| sysTid=28541 nice=0 sched=0/0 cgrp=apps handle=1541287176
| state=S schedstat=( 451876 609218 14 ) utm=0 stm=0 core=0
at java.lang.Object.wait(Native Method)

  • waiting on (a java.lang.Daemons$FinalizerWatchdogDaemon) at java.lang.Object.wait(Object.java:364) at java.lang.Daemons$FinalizerWatchdogDaemon.waitForObject(Daemons.java:230) at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:207) at java.lang.Thread.run(Thread.java:841)

"FinalizerDaemon" daemon prio=5 tid=7 WAIT
| group="system" sCount=1 dsCount=0 obj=0x42448640 self=0x5bde2008
| sysTid=28540 nice=0 sched=0/0 cgrp=apps handle=1541284960
| state=S schedstat=( 14235421 8436818 47 ) utm=1 stm=0 core=0
at java.lang.Object.wait(Native Method)

  • waiting on (a java.lang.ref.ReferenceQueue) at java.lang.Object.wait(Object.java:401) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73) at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170) at java.lang.Thread.run(Thread.java:841)

"ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT
| group="system" sCount=1 dsCount=0 obj=0x424484d8 self=0x5ec14460
| sysTid=28539 nice=0 sched=0/0 cgrp=apps handle=1589725368
| state=S schedstat=( 2807867 4756510 18 ) utm=0 stm=0 core=0
at java.lang.Object.wait(Native Method)

  • waiting on at java.lang.Object.wait(Object.java:364) at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:130) at java.lang.Thread.run(Thread.java:841)

"Compiler" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x424483e8 self=0x5ec14008
| sysTid=28538 nice=0 sched=0/0 cgrp=apps handle=1541294864
| state=S schedstat=( 374628429 196207032 2486 ) utm=19 stm=18 core=0
#00 pc 00021a98 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f034 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 00076c4b /system/lib/libdvm.so
#04 pc 00057815 /system/lib/libdvm.so
#05 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#06 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

"JDWP" daemon prio=5 tid=4 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x42448300 self=0x58b35830
| sysTid=28537 nice=0 sched=0/0 cgrp=apps handle=1487448632
| state=S schedstat=( 2560678 3524426 20 ) utm=0 stm=0 core=0
#00 pc 0002086c /system/lib/libc.so (select+20)
#01 pc 0006433f /system/lib/libdvm.so
#02 pc 00066e91 /system/lib/libdvm.so
#03 pc 00057815 /system/lib/libdvm.so
#04 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#05 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

"Signal Catcher" daemon prio=5 tid=3 RUNNABLE
| group="system" sCount=0 dsCount=0 obj=0x42448208 self=0x5bdde338
| sysTid=28536 nice=0 sched=0/0 cgrp=apps handle=1589714456
| state=R schedstat=( 21778283 13446303 35 ) utm=1 stm=1 core=1
at dalvik.system.NativeStart.run(Native Method)

"GC" daemon prio=5 tid=2 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x42448128 self=0x58b37830
| sysTid=28535 nice=0 sched=0/0 cgrp=apps handle=1541266408
| state=S schedstat=( 290835661 1780590841 14137 ) utm=2 stm=27 core=0
#00 pc 00021a98 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f034 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 0007560f /system/lib/libdvm.so
#04 pc 00057815 /system/lib/libdvm.so
#05 pc 0000d240 /system/lib/libc.so (__thread_entry+72)
#06 pc 0000d3d8 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)

NATIVE THREADS:
"gdingpai.paybox" sysTid=30946 nice=0 sched=0/0 cgrp=apps
| state=S schedstat=( 9895416 257812 7 ) utm=0 stm=0 core=0

"gdingpai.paybox" sysTid=30947 nice=0 sched=0/0 cgrp=apps
| state=S schedstat=( 49167 106614 2 ) utm=0 stm=0 core=0

"gdingpai.paybox" sysTid=30948 nice=0 sched=0/0 cgrp=apps
| state=S schedstat=( 60885 0 2 ) utm=0 stm=0 core=0

"gdingpai.paybox" sysTid=30949 nice=0 sched=0/0 cgrp=apps
| state=S schedstat=( 43230 9980989 3 ) utm=0 stm=0 core=0

"GL updater" sysTid=31132 nice=-10 sched=0/0 cgrp=apps
| state=S schedstat=( 364636 305104 4 ) utm=0 stm=0 core=1

----- end 28531 -----

3个回答

图片说明

Fingualin
夜空泪 我已经找到问题了,不是这里的问题,不过也是多开了几个线程跟定时器,然后关闭的时候没注意,不过还是谢谢啊
大约 3 年之前 回复

11-09 16:46:42.739: E/ActivityManager(1309): Reason: Input dispatching timed out (Waiting because the touched window has not finished processing the input events that were previously delivered to it.)

http://www.cnblogs.com/xinye/p/3534013.html

代码写得不对呗,90%是这样的,JS 或android 里哪个写错了。

Coder_Yi
Coder_Yi 说了跟没说一样
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
android 系统中/data/anr/下的traces.txt 文件可以通过代码删除吗?
请问android 系统中/data/anr/下的traces.txt 文件可以通过file.delete()删除吗? 删除这个用什么权限吗?
关于android ANR错误,求助?
一段log: E/ActivityManager( 834): Reason: keyDispatchingTimedOut E/ActivityManager( 834): Load: 7.84 / 3.14 / 1.16 E/ActivityManager( 834): CPU usage from 13781ms to 3279ms ago: E/ActivityManager( 834): 4% 834/system_server: 2.6% user + 1.3% kernel / faults: 102 minor E/ActivityManager( 834): 0.6% 276/mediaserver: 0.3% user + 0.2% kernel / faults: 1 minor E/ActivityManager( 834): 1.6% 345/adbd: 0% user + 1.6% kernel / faults: 47 minor E/ActivityManager( 834): 0.9% 270/surfaceflinger: 0.2% user + 0.6% kernel / faults: 1 minor E/ActivityManager( 834): 0.8% 2485/com.example.displaydemo: 0.4% user + 0.3% kernel / faults: 146 minor E/ActivityManager( 834): 0.7% 335/mm-pp-daemon: 0% user + 0.6% kernel E/ActivityManager( 834): 0.7% 1191/com.hx.memorycleaner: 0.5% user + 0.1% kernel / faults: 114 minor E/ActivityManager( 834): 0.5% 1561/mpdecision: 0% user + 0.5% kernel E/ActivityManager( 834): 0.4% 124/kworker/0:3: 0% user + 0.4% kernel E/ActivityManager( 834): 0.4% 445/sensors.qcom: 0.3% user + 0% kernel / faults: 1 minor E/ActivityManager( 834): 0% 157/kworker/u:5: 0% user + 0% kernel E/ActivityManager( 834): 0.2% 1814/kworker/0:2H: 0% user + 0.2% kernel E/ActivityManager( 834): 0.1% 3/ksoftirqd/0: 0% user + 0.1% kernel E/ActivityManager( 834): 0.1% 1091/MC_Thread: 0% user + 0.1% kernel E/ActivityManager( 834): 0% 2411/kworker/u:9: 0% user + 0% kernel E/ActivityManager( 834): 0% 1//init: 0% user + 0% kernel / faults: 35 minor E/ActivityManager( 834): 0% 27/kworker/0:1H: 0% user + 0% kernel E/ActivityManager( 834): 0% 100/file-storage: 0% user + 0% kernel E/ActivityManager( 834): 0% 160/ngd_msm_ctrl_ng: 0% user + 0% kernel E/ActivityManager( 834): 0% 263/vold: 0% user + 0% kernel E/ActivityManager( 834): 0% 322/qmuxd: 0% user + 0% kernel E/ActivityManager( 834): 0% 1092/TX_Thread: 0% user + 0% kernel E/ActivityManager( 834): 0% 1183/wpa_supplicant: 0% user + 0% kernel E/ActivityManager( 834): 0% 2410/kworker/u:8: 0% user + 0% kernel E/ActivityManager( 834): 0% 2417/kworker/u:15: 0% user + 0% kernel E/ActivityManager( 834): 0% 2422/kworker/u:20: 0% user + 0% kernel E/ActivityManager( 834): +0% 2988/logcat: 0% user + 0% kernel E/ActivityManager( 834): 20% TOTAL: 10% user + 9.4% kernel + 0% iowait E/ActivityManager( 834): CPU usage from 865ms to 1385ms later: E/ActivityManager( 834): 9.2% 834/system_server: 3.7% user + 5.5% kernel / faults: 3 minor E/ActivityManager( 834): 7.4% 956/ActivityManager: 1.8% user + 5.5% kernel E/ActivityManager( 834): 1.8% 1282/Binder_A: 1.8% user + 0% kernel E/ActivityManager( 834): 1.5% 1814/kworker/0:2H: 0% user + 1.5% kernel E/ActivityManager( 834): 2.9% TOTAL: 0.9% user + 1.9% kernel 就是想请问一下,这个问题,我是调用了Lock锁,ServiceUtil.class.wait()调用本地服务;但是我是在异步任务中调用的,出现了这种错误,求有什么好的解决办法??谢谢
android播放器加载时候按返回导致ANR异常,求大神
我自己写的一个android播放器,滑动屏幕进行快进,然后视频处于加载的时候,点击返回按钮,就会出现ANR异常。求解,想了好久了,求大神相救。不胜感激 ``` 03-10 13:18:44.878: E/mdb_debug(350): mdb_usb_sharenet.c:send_sharenet_msg[L-232]: mdb usb share net channel is not ready!: 0, Success 03-10 13:18:54.468: E/ActivityManager(960): ANR in com.edufound.dayvideo (com.edufound.dayvideo/.GameCpp) 03-10 13:18:54.468: E/ActivityManager(960): PID: 8639 03-10 13:18:54.468: E/ActivityManager(960): Reason: Input dispatching timed out (Waiting because no window has focus but there is a focused application that may eventually add a window when it finishes starting up.) 03-10 13:18:54.468: E/ActivityManager(960): Load: 18.71 / 18.09 / 17.94 03-10 13:18:54.468: E/ActivityManager(960): CPU usage from 6858ms to 83ms ago: 03-10 13:18:54.468: E/ActivityManager(960): 4.2% 960/system_server: 3.5% user + 0.7% kernel / faults: 384 minor 03-10 13:18:54.468: E/ActivityManager(960): 2.4% 202/surfaceflinger: 1.1% user + 1.3% kernel / faults: 16 minor 03-10 13:18:54.468: E/ActivityManager(960): 2.4% 1299/com.baidu.input_mi: 2.1% user + 0.2% kernel / faults: 2363 minor 03-10 13:18:54.468: E/ActivityManager(960): 1.9% 10951/mediaserver: 0% user + 1.9% kernel 03-10 13:18:54.468: E/ActivityManager(960): 1.6% 1172/com.android.systemui: 1.1% user + 0.4% kernel / faults: 13 minor 03-10 13:18:54.468: E/ActivityManager(960): 1.4% 33/kworker/u:1H: 0% user + 1.4% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.7% 733/RX_Thread: 0% user + 0.7% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.5% 462/charger_monitor: 0% user + 0.5% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.5% 1745/mpdecision: 0% user + 0.5% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.3% 8133/kworker/u:2: 0% user + 0.3% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.4% 130/w1_bus_master1: 0% user + 0.4% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.4% 8142/kworker/u:14: 0% user + 0.4% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.4% 8851/kworker/0:0H: 0% user + 0.4% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.2% 3/ksoftirqd/0: 0% user + 0.2% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.1% 7/kworker/u:0H: 0% user + 0.1% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.2% 418/sensors.qcom: 0.2% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.2% 705/mdss_fb0: 0% user + 0.2% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.2% 731/TX_Thread: 0% user + 0.2% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.2% 8134/kworker/u:5: 0% user + 0.2% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.2% 8161/kworker/0:2H: 0% user + 0.2% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.2% 13784/adbd: 0% user + 0.2% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 199/netd: 0% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 211/thermal-engine: 0% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 312/sdcard: 0% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 339/irq/289-wcd9xxx: 0% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 1356/com.android.phone: 0% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 1378/com.qualcomm.services.location: 0% user + 0% kernel / faults: 1 minor 03-10 13:18:54.468: E/ActivityManager(960): 0% 1562/android.process.acore: 0% user + 0% kernel / faults: 4 minor 03-10 13:18:54.468: E/ActivityManager(960): 0.1% 5372/logcat: 0.1% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 12099/com.tencent.mm: 0% user + 0% kernel / faults: 12 minor 03-10 13:18:54.468: E/ActivityManager(960): 0.1% 12819/com.miui.weather2:weatherservice: 0% user + 0.1% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0% 15554/com.miui.guardprovider: 0% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 0.1% 22737/com.tencent.mm:push: 0% user + 0.1% kernel 03-10 13:18:54.468: E/ActivityManager(960): 19% TOTAL: 8.4% user + 10% kernel + 0.6% iowait + 0.3% softirq 03-10 13:18:54.468: E/ActivityManager(960): CPU usage from 2062ms to 2579ms later with 99% awake: 03-10 13:18:54.468: E/ActivityManager(960): 5.6% 960/system_server: 0% user + 5.6% kernel 03-10 13:18:54.468: E/ActivityManager(960): 3.7% 989/ActivityManager: 0% user + 3.7% kernel 03-10 13:18:54.468: E/ActivityManager(960): 1.8% 960/system_server: 0% user + 1.8% kernel 03-10 13:18:54.468: E/ActivityManager(960): 1.8% 1464/Binder_B: 1.8% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 2.5% 462/charger_monitor: 0% user + 2.5% kernel 03-10 13:18:54.468: E/ActivityManager(960): 1.1% 3/ksoftirqd/0: 0% user + 1.1% kernel 03-10 13:18:54.468: E/ActivityManager(960): 1.3% 1172/com.android.systemui: 1.3% user + 0% kernel 03-10 13:18:54.468: E/ActivityManager(960): 1.4% 1745/mpdecision: 0% user + 1.4% kernel 03-10 13:18:54.468: E/ActivityManager(960): 1.4% 10951/mediaserver: 0% user + 1.4% kernel 03-10 13:18:54.468: E/ActivityManager(960): 8.5% TOTAL: 1.4% user + 7.1% kernel 03-10 13:19:00.268: E/AudioSink(10951): received unknown event type: 1 inside CallbackWrapper ! ```
android开发银联支付在小米4c上直接ANR异常,别的手机没事,什么原因???
android银联支付,点击调起银联,在别的手机上运行正常,在小米4c上直接ANR异常,什么原因???
android 观察你ANR 和 内存泄漏有哪些行之有效的工具?
在android 开发中,经常会遇到ANR和内存泄漏问题,那么在排除这些问题时,有没有什么行之有效的工具呢?系统提供的工具,确实能够发现一些问题,但是查看下来特别不直观,有没有什么更好的工具,或者快速定位问题的技巧呢?
android程序,eclipse没报错,但是运行会意外停止
本人刚开始学习android,跟着书写了个程序,这个程序是会有一个东西随着手指拖动而移动,编译完没有问题,但是在手机上运行的时候却是意外停止,错误显示在了MainActivity的第27行,我真不知道哪里错,代码和书上写的一模一样,求大神指导 MainActivity的代码: package com.example.test34; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.FrameLayout; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FrameLayout frameLayout=(FrameLayout)findViewById(R.id.mylayout); final RabbitView rabbit=new RabbitView(MainActivity.this); rabbit.setOnTouchListener(new OnTouchListener(){ @Override public boolean onTouch(View v,MotionEvent event){ rabbit.bitmapX=event.getX(); rabbit.bitmapY=event.getY(); rabbit.invalidate(); return true; } }); frameLayout.addView(rabbit); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } } RabbitView.java代码 package com.example.test34; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.view.View; public class RabbitView extends View { public float bitmapX; public float bitmapY; public RabbitView(Context context){ super(context); bitmapX=750; bitmapY=500; } @Override protected void onDraw(Canvas canvas){ super.onDraw(canvas); Paint paint=new Paint(); Bitmap bitmap=BitmapFactory.decodeResource(this.getResources(),R.drawable.ic_launcher); canvas.drawBitmap(bitmap,bitmapX,bitmapY,paint); if(bitmap.isRecycled()){ bitmap.recycle(); } } } activity_main代码 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" android:background="@drawable/background" android:id="@+id/mylayout" > </FrameLayout> logcat为: 07-22 17:27:52.100: D/dalvikvm(11872): GC_EXTERNAL_ALLOC freed 47K, 50% free 2740K/5379K, external 0K/0K, paused 71ms 07-22 17:27:52.120: D/AndroidRuntime(11872): Shutting down VM 07-22 17:27:52.120: W/dalvikvm(11872): threadid=1: thread exiting with uncaught exception (group=0x4001e578) 07-22 17:27:52.120: E/AndroidRuntime(11872): FATAL EXCEPTION: main 07-22 17:27:52.120: E/AndroidRuntime(11872): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.test34/com.example.test34.MainActivity}: java.lang.NullPointerException 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.os.Handler.dispatchMessage(Handler.java:99) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.os.Looper.loop(Looper.java:130) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.app.ActivityThread.main(ActivityThread.java:3691) 07-22 17:27:52.120: E/AndroidRuntime(11872): at java.lang.reflect.Method.invokeNative(Native Method) 07-22 17:27:52.120: E/AndroidRuntime(11872): at java.lang.reflect.Method.invoke(Method.java:507) 07-22 17:27:52.120: E/AndroidRuntime(11872): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) 07-22 17:27:52.120: E/AndroidRuntime(11872): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670) 07-22 17:27:52.120: E/AndroidRuntime(11872): at dalvik.system.NativeStart.main(Native Method) 07-22 17:27:52.120: E/AndroidRuntime(11872): Caused by: java.lang.NullPointerException 07-22 17:27:52.120: E/AndroidRuntime(11872): at com.example.test34.MainActivity.onCreate(MainActivity.java:27) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050) 07-22 17:27:52.120: E/AndroidRuntime(11872): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) 07-22 17:27:52.120: E/AndroidRuntime(11872): ... 11 more 07-22 17:27:54.130: I/dalvikvm(11872): threadid=4: reacting to signal 3 07-22 17:27:54.130: I/dalvikvm(11872): Wrote stack traces to '/data/anr/traces.txt'
viewPager的setCurrentItem()造成ANR异常
在百度查找说,viewPager.setCurrentItem( ); 在滚动太多页的时候会造成ANR,那请问要怎么解决?求大神帮忙,新手 一个
一个Monkey测出来的ANR的问题
在提交小米应用市场的时候,检测出在红米3S、小米4C(安卓7.0)的时候报ANR, 但是在用真机运行的时候又没有发现问题,很是痛苦,希望有大牛可以帮我分析分析这个问题; 报错如下: 05-18 09:31:14.101 1334 1431 E ActivityManager: ANR in com.demo.code (com.demo.code/.SplashActivity) 05-18 09:31:14.101 1334 1431 E ActivityManager: PID: 5843 05-18 09:31:14.101 1334 1431 E ActivityManager: Reason: Input dispatching timed out (Waiting because no window has focus but there is a focused application that may eventually add a window when it finishes starting up.)
如何理解在主线程进行读写操作而导致ANR?
刚看了一篇优秀博文,讲了导致ANR的原因之一是CPU满负荷,可能是因为在主线程频繁的文件读写。我想问的问题是为什么在子线程执行文件读写就不会CPU满负荷?难道主线程执行的占用时间比子线程长?
阿里面试问到的几道题
请求大神指点! **1.如何定位ANR的位置,AS自带有一个工具可以分析ANR?** 不就是看data/traces.txt吗?  这个工具是Monitor里的DDMS还是什么TraceVuew吗?  现在Android3.0移除了Monitor, 请问是在Profiler的CPU那个模块吗?  **2.假如子线程运行出错(空指针或者其他错误),整个app都会crash,在不用try-catch的前提下,怎样才能使得子线程出错而不导致整个app的crash,结果只是这个线程的任务无法完成,而APP不会Crash??** 
android sqlite数据写入数据的时候,主界面会卡主,怎么解决?
android 使用xutils访问网络获取json串,然后解析插入android本地的sqlite数据库, 在执行写入数据库的时候 ,主界面会卡主,做其他操作会报错ANR,怎么解决,sqlitexu 要写入的数据6万条左右,大概要40分钟,主界面就卡40分钟。
Android页面跳转出现卡顿或者ANR,可以从哪些方面进行优化?
情景如下:在A页面执行完拍照上传或者选择本地图片上传后,跳转到B页面,程序卡住,无法操作,但是如果不传照片德华程序跳转压根就不会卡住。在开发过程中,每当发生页面跳转时均会调用this.finish()刚发对当前页面进行销毁,尽管如此,跳转发生时APP卡顿依旧存在,且频频发生,请问各位前辈可有好的解决办法,求传授,小生将对此不胜感激!
Android 线程同步的问题,太失望了,都没人会吗?
请问我这个锁实际上达到线程同步了吗? ``` public static void release() { // 开启一个子线程去释放visualizer对象,避免造成ANR new Thread(new Runnable() { @Override public void run() { synchronized (this) { try { if (visualizer != null) { visualizer.release(); visualizer = null; } } catch (Exception e) { e.printStackTrace(); } } } }).start(); } ```
当进度对话框和后台线程活动的时候如何处理屏幕的方向的变化?
我的程序是在一个后台的线程里进行网络活动。在开始之前,它弹出一个进度对话框。这个对话框是处理器上被驳回的。除了当对话框出现的时候屏幕的方向发生变换(后台线程也跟随着发生变化),其他的都是正常的。在时,应用或者崩溃,有时候死锁,或者是当所有的线程都被杀死的时候进入到应用,否则一点都不起作用这样一个怪异的阶段。 我能怎样处理屏幕方向发生变化这个问题? 下面的示例代码大概就是我的真正的程序: public class MyAct extends Activity implements Runnable { public ProgressDialog mProgress; // UI has a button that when pressed calls send public void send() { mProgress = ProgressDialog.show(this, "Please wait", "Please wait", true, true); Thread thread = new Thread(this); thread.start(); } public void run() { Thread.sleep(10000); Message msg = new Message(); mHandler.sendMessage(msg); } private final Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { mProgress.dismiss(); } }; } 栈: E/WindowManager( 244): Activity MyAct has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@433b7150 that was originally added here E/WindowManager( 244): android.view.WindowLeaked: Activity MyAct has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@433b7150 that was originally added here E/WindowManager( 244): at android.view.ViewRoot.<init>(ViewRoot.java:178) E/WindowManager( 244): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:147) E/WindowManager( 244): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:90) E/WindowManager( 244): at android.view.Window$LocalWindowManager.addView(Window.java:393) E/WindowManager( 244): at android.app.Dialog.show(Dialog.java:212) E/WindowManager( 244): at android.app.ProgressDialog.show(ProgressDialog.java:103) E/WindowManager( 244): at android.app.ProgressDialog.show(ProgressDialog.java:91) E/WindowManager( 244): at MyAct.send(MyAct.java:294) E/WindowManager( 244): at MyAct$4.onClick(MyAct.java:174) E/WindowManager( 244): at android.view.View.performClick(View.java:2129) E/WindowManager( 244): at android.view.View.onTouchEvent(View.java:3543) E/WindowManager( 244): at android.widget.TextView.onTouchEvent(TextView.java:4664) E/WindowManager( 244): at android.view.View.dispatchTouchEvent(View.java:3198) E/WindowManager( 244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) E/WindowManager( 244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) E/WindowManager( 244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) E/WindowManager( 244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) E/WindowManager( 244): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) E/WindowManager( 244): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1593) E/WindowManager( 244): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1089) E/WindowManager( 244): at android.app.Activity.dispatchTouchEvent(Activity.java:1871) E/WindowManager( 244): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1577) E/WindowManager( 244): at android.view.ViewRoot.handleMessage(ViewRoot.java:1140) E/WindowManager( 244): at android.os.Handler.dispatchMessage(Handler.java:88) E/WindowManager( 244): at android.os.Looper.loop(Looper.java:123) E/WindowManager( 244): at android.app.ActivityThread.main(ActivityThread.java:3739) E/WindowManager( 244): at java.lang.reflect.Method.invokeNative(Native Method) E/WindowManager( 244): at java.lang.reflect.Method.invoke(Method.java:515) E/WindowManager( 244): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) E/WindowManager( 244): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) E/WindowManager( 244): at dalvik.system.NativeStart.main(Native Method) 和: W/dalvikvm( 244): threadid=3: thread exiting with uncaught exception (group=0x4000fe68) E/AndroidRuntime( 244): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 244): java.lang.IllegalArgumentException: View not attached to window manager E/AndroidRuntime( 244): at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:331) E/AndroidRuntime( 244): at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200) E/AndroidRuntime( 244): at android.view.Window$LocalWindowManager.removeView(Window.java:401) E/AndroidRuntime( 244): at android.app.Dialog.dismissDialog(Dialog.java:249) E/AndroidRuntime( 244): at android.app.Dialog.access$000(Dialog.java:59) E/AndroidRuntime( 244): at android.app.Dialog$1.run(Dialog.java:93) E/AndroidRuntime( 244): at android.app.Dialog.dismiss(Dialog.java:233) E/AndroidRuntime( 244): at MyAct$1.handleMessage(MyAct.java:321) E/AndroidRuntime( 244): at android.os.Handler.dispatchMessage(Handler.java:88) E/AndroidRuntime( 244): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 244): at android.app.ActivityThread.main(ActivityThread.java:3739) E/AndroidRuntime( 244): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 244): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 244): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) E/AndroidRuntime( 244): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) E/AndroidRuntime( 244): at dalvik.system.NativeStart.main(Native Method) I/Process ( 46): Sending signal. PID: 244 SIG: 3 I/dalvikvm( 244): threadid=7: reacting to signal 3 I/dalvikvm( 244): Wrote stack trace to '/data/anr/traces.txt' I/Process ( 244): Sending signal. PID: 244 SIG: 9 I/ActivityManager( 46): Process MyAct (pid 244) has died. 我试图在onSaveInstanceState上取消对话框的进度条,但是这只能防止立即崩溃。后台线程仍然在运行,而且这个用户界面有一部分是处于拉伸状态的。需要杀掉整个应用程序才会重新开始工作。
Android的UI线程是不断循环的吗?
在主线程进行大量的读写操作时,界面就会卡住,抛出ANR异常,所以我就设想是不是在主线程是不断循环的,当读写操作时,主线程执行不到刷新界面的代码,所以界面就卡住了。我这样的理解有错误吗?
Android:Unable to open stack file
### 问题描述 我的程序使用get方法用api获取数据。log输出都很正常,但在输出到TextView时报错。 ### 报错如下 06-11 11:20:35.692: E/dalvikvm(253): Unable to open stack trace file '/data/anr/traces.txt': Permission denied ### 代码如下 ``` geturl="http://v1.itooi.cn/netease/search?keyword="+name.getText()+"&type=song&pagesize=1"; new Thread(new Runnable() { public void run() { try { URL url = new URL(geturl); HttpURLConnection connection = (HttpURLConnection) url.openConnection();//开启连接 connection.connect();//连接服务器 if (connection.getResponseCode() == 200) { //使用字符流形式进行回复 InputStream is = connection.getInputStream(); //读取信息BufferReader BufferedReader reader = new BufferedReader(new InputStreamReader(is)); StringBuffer buffer = new StringBuffer(); String readLine = ""; while ((readLine = reader.readLine()) != null) { buffer.append(readLine); } is.close(); reader.close(); connection.disconnect(); res=buffer.toString(); Log.d("Msg", res); rest.setText(res); } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } ``` (请不要在意括号匹配,重点看“rest.setText(res);”,我注释掉这句就没错了,这句什么问题?)
java线程问题——使用线程解决anr问题
以下两个方式效果一样吗? 1、 Hanlder handler = new Handler(); handler.post(new Runnable(){ public void run(){ //耗时操作 } }); 2、 final Runnable onCompleteRunnable = new Runnable() { @Override public void run() { //耗时操作 } }; onCompleteRunnable.run(); 问题:我用第二种方法执行耗时操作,有时候会引起anr。第一种方法可以解决anr问题吗?
应用出现anr或者卡顿不流畅的情况,有什么优化经验可传授
1、anr问题比较明显的栈可以看出来,但也有经常看不出来的类型,不知道怎么下手 2、滚动不流畅、数据加载和更新UI的时候卡顿,希望能传授一些标准的解决方式或想法 谢谢
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私有的数
win10系统安装教程(U盘PE+UEFI安装)
一、准备工作 u盘,电脑一台,win10原版镜像(msdn官网) 二、下载wepe工具箱  极力推荐微pe(微pe官方下载) 下载64位的win10 pe,使用工具箱制作启动U盘打开软件,   选择安装到U盘(按照操作无需更改) 三、重启进入pe系统   1、关机后,将U盘插入电脑 2、按下电源后,按住F12进入启动项选择(技嘉主板是F12)     选择需要启
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小人工智障。 思路可以运用在不同地方,主要介绍的是思路。
Nginx 软件层面加强Nginx性能优化的面试问答和解决方案
Nginx 软件层面加强Nginx性能优化的面试问答和解决方案 去年我去爱卡汽车面试PHP,一轮和二轮面的都不错,在三轮面到Nginx的时候很多问题当时不知道怎么回答,确实没有深入学习过,花了一段时间的学习,终于能解答Nginx高性能优化的问题了,10月24号为了获得程序员勋章,发布了半个优化笔记,浏览到了1000+,受到这个鼓舞,我抽时间在仔细整理下关于Nginx性能优化的问题,我们从软件说起。...
【管理系统课程设计】美少女手把手教你后台管理
【文章后台管理系统】URL设计与建模分析+项目源码+运行界面 栏目管理、文章列表、用户管理、角色管理、权限管理模块(文章最后附有源码) 1. 这是一个什么系统? 1.1 学习后台管理系统的原因 随着时代的变迁,现如今各大云服务平台横空出世,市面上有许多如学生信息系统、图书阅读系统、停车场管理系统等的管理系统,而本人家里就有人在用烟草销售系统,直接在网上完成挑选、购买与提交收货点,方便又快捷。 试想,若没有烟草销售系统,本人家人想要购买烟草,还要独自前往药...
11月19日科技资讯|华为明日发布鸿蒙整体战略;京东宣告全面向技术转型;Kotlin 1.3.60 发布
「极客头条」—— 技术人员的新闻圈! CSDN 的读者朋友们早上好哇,「极客头条」来啦,快来看今天都有哪些值得我们技术人关注的重要新闻吧。扫描上方二维码进入 CSDN App 可以收听御姐萌妹 Style 的人工版音频哟。 一分钟速览新闻点! 6G 专家组成员:速率是 5G 的 10 至 100 倍,预计 2030 年商用 雷军:很多人多次劝我放弃WPS,能坚持下来并不是纯粹的商业决定 ...
C语言魔塔游戏
很早就很想写这个,今天终于写完了。 游戏截图: 编译环境: VS2017 游戏需要一些图片,如果有想要的或者对游戏有什么看法的可以加我的QQ 2985486630 讨论,如果暂时没有回应,可以在博客下方留言,到时候我会看到。 下面我来介绍一下游戏的主要功能和实现方式 首先是玩家的定义,使用结构体,这个名字是可以自己改变的 struct gamerole { char n
化繁为简 - 腾讯计费高一致TDXA的实践之路
导语:腾讯计费是孵化于支撑腾讯内部业务千亿级营收的互联网计费平台,在如此庞大的业务体量下,腾讯计费要支撑业务的快速增长,同时还要保证每笔交易不错账。采用最终一致性或离线补...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple/ 
Java学习笔记(七十二)—— Cookie
概述 会话技术: 会话:一次会话中包含多次请求和响应 一次会话:浏览器第一次给服务器发送资源请求,会话建立,直到有一方断开为止 功能:在一次会话的范围内的多次请求间,共享数据 方式: 客户端会话技术:Cookie,把数据存储到客户端 服务器端会话技术:Session,把数据存储到服务器端 Cookie 概念:客户端会话技术,将数据存储到客户端 快速入门: 使用步骤: 创建C
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆  每天早上8:30推送 作者| Mr.K   编辑| Emma 来源| 技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯
程序员该看的几部电影
##1、骇客帝国(1999) 概念:在线/离线,递归,循环,矩阵等 剧情简介: 不久的将来,网络黑客尼奥对这个看似正常的现实世界产生了怀疑。 他结识了黑客崔妮蒂,并见到了黑客组织的首领墨菲斯。 墨菲斯告诉他,现实世界其实是由一个名叫“母体”的计算机人工智能系统控制,人们就像他们饲养的动物,没有自由和思想,而尼奥就是能够拯救人类的救世主。 可是,救赎之路从来都不会一帆风顺,到底哪里才是真实的世界?
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东
@程序员,如何花式构建线程?
作者 |曾建责编 | 郭芮出品 | CSDN(ID:CSDNnews)在项目和业务的开发中,我们难免要经常使用线程来进行业务处理,使用线程可以保证我们的业务在相互处理之间可以保证原子性...
破14亿,Python分析我国存在哪些人口危机!
2020年1月17日,国家统计局发布了2019年国民经济报告,报告中指出我国人口突破14亿。 猪哥的朋友圈被14亿人口刷屏,但是很多人并没有看到我国复杂的人口问题:老龄化、男女比例失衡、生育率下降、人口红利下降等。 今天我们就来分析一下我们国家的人口数据吧! 一、背景 1.人口突破14亿 2020年1月17日,国家统计局发布了 2019年国民经济报告 ,报告中指出:年末中国大陆总人口(包括31个
强烈推荐10本程序员在家读的书
很遗憾,这个鼠年春节注定是刻骨铭心的,新型冠状病毒让每个人的神经都是紧绷的。那些处在武汉的白衣天使们,尤其值得我们的尊敬。而我们这些窝在家里的程序员,能不外出就不外出,就是对社会做出的最大的贡献。 有些读者私下问我,窝了几天,有点颓丧,能否推荐几本书在家里看看。我花了一天的时间,挑选了 10 本我最喜欢的书,你可以挑选感兴趣的来读一读。读书不仅可以平复恐惧的压力,还可以对未来充满希望,毕竟苦难终
Linux自学篇——linux命令英文全称及解释
man: Manual 意思是手册,可以用这个命令查询其他命令的用法。 pwd:Print working directory 显示当前目录 su:Swith user 切换用户,切换到root用户 cd:Change directory 切换目录 ls:List files 列出目录下的文件 ps:Process Status 进程状态 mk
Python实战:抓肺炎疫情实时数据,画2019-nCoV疫情地图
文章目录1. 前言2. 数据下载3. 数据处理4. 数据可视化 1. 前言 今天,群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者,国家重点实验室成员,于不惑之年学习python,实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据,也没有画过类似的数据分布图。于是就拿了两个小时,专门研究了一下,遂成此文。 2月6日追记:本文发布后,腾讯的数据源多次变更u
智力题(程序员面试经典)
NO.1  有20瓶药丸,其中19瓶装有1克/粒的药丸,余下一瓶装有1.1克/粒的药丸。给你一台称重精准的天平,怎么找出比较重的那瓶药丸?天平只能用一次。 解法 有时候,严格的限制条件有可能反倒是解题的线索。在这个问题中,限制条件是天平只能用一次。 因为天平只能用一次,我们也得以知道一个有趣的事实:一次必须同时称很多药丸,其实更准确地说,是必须从19瓶拿出药丸进行称重。否则,如果跳过两瓶或更多瓶药
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ......
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!
2020年的1月,我辞掉了我的第一份工作
其实,这篇文章,我应该早点写的,毕竟现在已经2月份了。不过一些其它原因,或者是我的惰性、还有一些迷茫的念头,让自己迟迟没有试着写一点东西,记录下,或者说是总结下自己前3年的工作上的经历、学习的过程。 我自己知道的,在写自己的博客方面,我的文笔很一般,非技术类的文章不想去写;另外我又是一个还比较热衷于技术的人,而平常复杂一点的东西,如果想写文章写的清楚点,是需要足够...
别低估自己的直觉,也别高估自己的智商
所有群全部吵翻天,朋友圈全部沦陷,公众号疯狂转发。这两周没怎么发原创,只发新闻,可能有人注意到了。我不是懒,是文章写了却没发,因为大家的关注力始终在这次的疫情上面,发了也没人看。当然,我...
Java坑人面试题系列: 包装类(中级难度)
Java Magazine上面有一个专门坑人的面试题系列: https://blogs.oracle.com/javamagazine/quiz-2。 这些问题的设计宗旨,主要是测试面试者对Java语言的了解程度,而不是为了用弯弯绕绕的手段把面试者搞蒙。 如果你看过往期的问题,就会发现每一个都不简单。 这些试题模拟了认证考试中的一些难题。 而 “中级(intermediate)” 和 “高级(ad
Spring Boot 2.x基础教程:使用JdbcTemplate访问MySQL数据库
在第2章节中,我们介绍了如何通过Spring Boot来实现HTTP接口,以及围绕HTTP接口相关的单元测试、文档生成等实用技能。但是,这些内容还不足以帮助我们构建一个动态应用的服务端程序。不论我们是要做App、小程序、还是传统的Web站点,对于用户的信息、相关业务的内容,通常都需要对其进行存储,而不是像第2章节中那样,把用户信息存储在内存中(重启就丢了!)。 对于信息的存储,现在已经有非常非常多...
基于Python的人脸自动戴口罩系统
目录 1、项目背景 2、页面设计 3、器官识别 4、退出系统 1、项目背景 2019年新型冠状病毒感染的肺炎疫情发生以来,牵动人心,举国哀痛,口罩、酒精、消毒液奇货可居。 抢不到口罩,怎么办?作为技术人今天分享如何使用Python实现自动戴口罩系统,来安慰自己,系统效果如下所示: 本系统的实现原理是借助 Dlib模块的Landmark人脸68个关键点检测库轻松识别出人脸五官
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。   再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。   下文是原回答,希望能对你能有所启发。   如果我说,这个世界上人真的分三六九等,
节后首个工作日,企业们集体开晨会让钉钉挂了
By 超神经场景描述:昨天 2 月 3 日,是大部分城市号召远程工作的第一天,全国有接近 2 亿人在家开始远程办公,钉钉上也有超过 1000 万家企业活跃起来。关键词:十一出行 人脸...
相关热词 c#导入fbx c#中屏蔽键盘某个键 c#正态概率密度 c#和数据库登陆界面设计 c# 高斯消去法 c# codedom c#读取cad文件文本 c# 控制全局鼠标移动 c# temp 目录 bytes初始化 c#
立即提问