Android ANR - 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改如何修改? 在线等----- pid 17801 at 2018-06-28 13:18:52 -----
Cmd line: com.psm.laborshareJNI: CheckJNI is off; workarounds are off; pins=0; globals=294DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x41799ea0 self=0x41784ca0
| sysTid=17801 nice=0 sched=0/0 cgrp=apps handle=1074413908
| state=S schedstat=( 1369528484 3700671841 4843 ) utm=77 stm=59 core=1
#00 pc 00021908 /system/lib/libc.so (epoll_wait+12)
#01 pc 0001063f /system/lib/libutils.so (android::Looper::pollInner(int)+98)
#02 pc 00010869 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
#03 pc 000704a9 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
#04 pc 00020d0c /system/lib/libdvm.so (dvmPlatformInvoke+112)
#05 pc 000519af /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
#06 pc 0002a1a0 /system/lib/libdvm.so
#07 pc 00031650 /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
#08 pc 0002ece8 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#09 pc 000640f9 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+392)
#10 pc 0006c4b3 /system/lib/libdvm.so
#11 pc 0002a1a0 /system/lib/libdvm.so
#12 pc 00031650 /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
#13 pc 0002ece8 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#14 pc 00063e15 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
#15 pc 0004d597 /system/lib/libdvm.so
#16 pc 0005242f /system/lib/libandroid_runtime.so
#17 pc 000539c3 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+354)
#18 pc 0000208f /system/bin/app_process
#19 pc 0000e51b /system/lib/libc.so (__libc_init+50)
#20 pc 00001bd4 /system/bin/app_process
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.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)"xTID#4" prio=5 tid=10 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42b34d00 self=0x7b8fbf10
| sysTid=18280 nice=0 sched=0/0 cgrp=apps handle=2062663128
| state=S schedstat=( 245365 31591406 3 ) utm=0 stm=0 core=3
at java.lang.Object.wait(Native Method)
- waiting on <0x42b34e20> (a java.lang.VMThread) held by tid=10 (xTID#4)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"xTID#3" prio=5 tid=28 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42bd4d98 self=0x7d509bb8
| sysTid=18150 nice=0 sched=0/0 cgrp=apps handle=2102435856
| state=S schedstat=( 510000 9421459 2 ) utm=0 stm=0 core=3
at java.lang.Object.wait(Native Method)
- waiting on <0x42bd4ee0> (a java.lang.VMThread) held by tid=28 (xTID#3)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"xTID#2" prio=5 tid=27 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42bd4998 self=0x7ba3eda0
| sysTid=18149 nice=0 sched=0/0 cgrp=apps handle=2060962400
| state=S schedstat=( 31678237 212162180 226 ) utm=1 stm=2 core=3
at java.lang.Object.wait(Native Method)
- waiting on <0x42bd4ab8> (a java.lang.VMThread) held by tid=27 (xTID#2)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"hwuiTask1" prio=5 tid=26 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x42c8fcb0 self=0x7c152f28
| sysTid=18145 nice=0 sched=0/0 cgrp=apps handle=2081762320
| state=S schedstat=( 769741 8332134 4 ) utm=0 stm=0 core=2
#00 pc 00021ad0 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f0f4 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 0000e691 /system/lib/libhwui.so
#04 pc 0000e9ed /system/lib/libutils.so (android::Thread::_threadLoop(void*)+104)
#05 pc 000523c9 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
#06 pc 0000e58f /system/lib/libutils.so
#07 pc 0000d2a0 /system/lib/libc.so (__thread_entry+72)
#08 pc 0000d438 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)"pool-7-thread-1" prio=5 tid=25 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42bd7b58 self=0x7ad1a588
| sysTid=18118 nice=0 sched=0/0 cgrp=apps handle=2060952224
| state=S schedstat=( 12585779 25275157 67 ) utm=1 stm=0 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x42bd7ca0> (a java.lang.VMThread) held by tid=25 (pool-7-thread-1)
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.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
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)"xTID#1" prio=5 tid=24 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42ef5628 self=0x7b9240c0
| sysTid=18089 nice=0 sched=0/0 cgrp=apps handle=2062759896
| state=S schedstat=( 71459165 475155517 350 ) utm=5 stm=2 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x42fad340> (a java.lang.VMThread) held by tid=24 (xTID#1)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"OkHttp ConnectionPool" daemon prio=5 tid=15 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x42e53f00 self=0x7447c1d0
| sysTid=17917 nice=0 sched=0/0 cgrp=apps handle=1920767152
| state=S schedstat=( 2434894 27100835 41 ) utm=0 stm=0 core=2
at java.lang.Object.wait(Native Method)
- waiting on <0x42e53fd8> (a java.lang.VMThread) held by tid=15 (OkHttp ConnectionPool)
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.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:435)
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)"SL-NetWorkSender" prio=5 tid=23 NATIVE
| group="main" sCount=1 dsCount=0
Cmd line: com.psm.laborshareJNI: CheckJNI is off; workarounds are off; pins=0; globals=294DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x41799ea0 self=0x41784ca0
| sysTid=17801 nice=0 sched=0/0 cgrp=apps handle=1074413908
| state=S schedstat=( 1369528484 3700671841 4843 ) utm=77 stm=59 core=1
#00 pc 00021908 /system/lib/libc.so (epoll_wait+12)
#01 pc 0001063f /system/lib/libutils.so (android::Looper::pollInner(int)+98)
#02 pc 00010869 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
#03 pc 000704a9 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
#04 pc 00020d0c /system/lib/libdvm.so (dvmPlatformInvoke+112)
#05 pc 000519af /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
#06 pc 0002a1a0 /system/lib/libdvm.so
#07 pc 00031650 /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
#08 pc 0002ece8 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#09 pc 000640f9 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+392)
#10 pc 0006c4b3 /system/lib/libdvm.so
#11 pc 0002a1a0 /system/lib/libdvm.so
#12 pc 00031650 /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
#13 pc 0002ece8 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#14 pc 00063e15 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
#15 pc 0004d597 /system/lib/libdvm.so
#16 pc 0005242f /system/lib/libandroid_runtime.so
#17 pc 000539c3 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+354)
#18 pc 0000208f /system/bin/app_process
#19 pc 0000e51b /system/lib/libc.so (__libc_init+50)
#20 pc 00001bd4 /system/bin/app_process
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.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)"xTID#4" prio=5 tid=10 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42b34d00 self=0x7b8fbf10
| sysTid=18280 nice=0 sched=0/0 cgrp=apps handle=2062663128
| state=S schedstat=( 245365 31591406 3 ) utm=0 stm=0 core=3
at java.lang.Object.wait(Native Method)
- waiting on <0x42b34e20> (a java.lang.VMThread) held by tid=10 (xTID#4)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"xTID#3" prio=5 tid=28 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42bd4d98 self=0x7d509bb8
| sysTid=18150 nice=0 sched=0/0 cgrp=apps handle=2102435856
| state=S schedstat=( 510000 9421459 2 ) utm=0 stm=0 core=3
at java.lang.Object.wait(Native Method)
- waiting on <0x42bd4ee0> (a java.lang.VMThread) held by tid=28 (xTID#3)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"xTID#2" prio=5 tid=27 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42bd4998 self=0x7ba3eda0
| sysTid=18149 nice=0 sched=0/0 cgrp=apps handle=2060962400
| state=S schedstat=( 31678237 212162180 226 ) utm=1 stm=2 core=3
at java.lang.Object.wait(Native Method)
- waiting on <0x42bd4ab8> (a java.lang.VMThread) held by tid=27 (xTID#2)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"hwuiTask1" prio=5 tid=26 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x42c8fcb0 self=0x7c152f28
| sysTid=18145 nice=0 sched=0/0 cgrp=apps handle=2081762320
| state=S schedstat=( 769741 8332134 4 ) utm=0 stm=0 core=2
#00 pc 00021ad0 /system/lib/libc.so (__futex_syscall3+8)
#01 pc 0000f094 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#02 pc 0000f0f4 /system/lib/libc.so (__pthread_cond_timedwait+64)
#03 pc 0000e691 /system/lib/libhwui.so
#04 pc 0000e9ed /system/lib/libutils.so (android::Thread::_threadLoop(void*)+104)
#05 pc 000523c9 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
#06 pc 0000e58f /system/lib/libutils.so
#07 pc 0000d2a0 /system/lib/libc.so (__thread_entry+72)
#08 pc 0000d438 /system/lib/libc.so (pthread_create+240)
at dalvik.system.NativeStart.run(Native Method)"pool-7-thread-1" prio=5 tid=25 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42bd7b58 self=0x7ad1a588
| sysTid=18118 nice=0 sched=0/0 cgrp=apps handle=2060952224
| state=S schedstat=( 12585779 25275157 67 ) utm=1 stm=0 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x42bd7ca0> (a java.lang.VMThread) held by tid=25 (pool-7-thread-1)
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.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
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)"xTID#1" prio=5 tid=24 WAIT
| group="main" sCount=1 dsCount=0 obj=0x42ef5628 self=0x7b9240c0
| sysTid=18089 nice=0 sched=0/0 cgrp=apps handle=2062759896
| state=S schedstat=( 71459165 475155517 350 ) utm=5 stm=2 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x42fad340> (a java.lang.VMThread) held by tid=24 (xTID#1)
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.PriorityBlockingQueue.take(PriorityBlockingQueue.java:510)
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)"OkHttp ConnectionPool" daemon prio=5 tid=15 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x42e53f00 self=0x7447c1d0
| sysTid=17917 nice=0 sched=0/0 cgrp=apps handle=1920767152
| state=S schedstat=( 2434894 27100835 41 ) utm=0 stm=0 core=2
at java.lang.Object.wait(Native Method)
- waiting on <0x42e53fd8> (a java.lang.VMThread) held by tid=15 (OkHttp ConnectionPool)
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.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:435)
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)"SL-NetWorkSender" prio=5 tid=23 NATIVE
| group="main" sCount=1 dsCount=0
是在下面的这个Activity出现ANR,但是我感觉这个Activity的代码应该没啥问题
@ContentView(R.layout.activity_login)
public class LoginActivity extends BaseActivity implements View.OnClickListener { private static final String TAG = LoginActivity.class.getSimpleName();
@ViewInject(R.id.btLogin)
CustomButton btLogin;
@ViewInject(R.id.btRegister)
CustomButton btRegister;
private boolean isFromHtml; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
StatusBarUtil.setTransparentForImageView(this, null); isFromHtml = analyzeIntent();
Log.d(TAG, "isFromHtml ==> " + isFromHtml);
btLogin.setOnClickListener(this);
btRegister.setOnClickListener(this);
} @Override
public void onResume() {
super.onResume();
SharedPreferenceUtils.putString(this, SharedPreferenceConfig.PORT_TYPE, "");
SharedPreferenceUtils.putString(this, SharedPreferenceConfig.PORT_TYPE, "");
} /**
* 解析Intent中的数据
*/
private boolean analyzeIntent() {
Intent intent = getIntent();
String scheme = intent.getScheme(); if (TextUtils.isEmpty(scheme)) {
String dataString = intent.getDataString();
Uri uri = intent.getData();
System.out.println("scheme:" + scheme);
if (uri != null) {
//完整的url信息
String url = uri.toString();
//scheme部分
String schemes = uri.getScheme();
//host部分
String host = uri.getHost();
//port部分
int port = uri.getPort();
//访问路径
String path = uri.getPath();
//编码路径
String path1 = uri.getEncodedPath();
//query部分
String queryString = uri.getQuery();
//获取参数值
String from = uri.getQueryParameter("from");
String id = uri.getQueryParameter("id");
Log.d(TAG, "host:" + host);
Log.d(TAG, "dataString:" + dataString);
Log.d(TAG, "id:" + id);
Log.d(TAG, "path:" + path);
Log.d(TAG, "path1:" + path1);
Log.d(TAG, "queryString:" + queryString);
Log.d(TAG, "from:" + from);
//来自积分商城
return true;
}
}
//app内部跳转
return false;
} @Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btLogin:
//我要求职
SharedPreferenceUtils.putString(this, SharedPreferenceConfig.PORT_TYPE, GlobalConfig.WORKER_TYPE);
startActivity(new Intent(this, AcLoginPw.class));
break;
case R.id.btRegister:
//我要招人
SharedPreferenceUtils.putString(this, SharedPreferenceConfig.PORT_TYPE, GlobalConfig.ENTERPRISE_TYPE);
startActivity(new Intent(this, AcLoginPw.class));
break;
}
}
}
可参考这篇文章https://blog.csdn.net/qq_30993595/article/details/80277333
我用了xUtils的注解