我从谷歌报告中得到了ANR, 我不知道发生了什么以及如何解决这个问题。 有谁知道发生了什么事?
发布Android 7.0 7.1
错误日志:
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 obj=0x75202000 self=0x7f85e96a00
| sysTid=10438 nice=-10 cgrp=default sched=0/0 handle=0x7f8a3f3a98
| state=S schedstat=( 34499430902 5874352557 56073 ) utm=2681 stm=768 core=6 HZ=100
| stack=0x7fca788000-0x7fca78a000 stackSize=8MB
| held mutexes=
#00 pc 00000000000786e8 /system/lib64/libc.so (__ioctl+4)
#01 pc 0000000000020378 /system/lib64/libc.so (ioctl+140)
#02 pc 0000000000055a80 /system/lib64/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+256)
#03 pc 0000000000056a24 /system/lib64/libbinder.so (_ZN7android14IPCThreadState15waitForResponseEPNS_6ParcelEPi+708)
#04 pc 000000000004b4cc /system/lib64/libbinder.so (_ZN7android8BpBinder8transactEjRKNS_6ParcelEPS1_j+72)
#05 pc 00000000001007cc /system/lib64/libandroid_runtime.so (???)
#06 pc 000000000088b078 /system/framework/arm64/boot-framework.oat (Java_android_os_BinderProxy_transactNative__ILandroid_os_Parcel_2Landroid_os_Parcel_2I+196)
at android.os.BinderProxy.transactNative (BinderProxy.java)
at android.os.BinderProxy.transact (BinderProxy.java:615)
at android.content.ContentProviderProxy.query (ContentProviderProxy.java:419)
at android.content.ContentResolver.query (ContentResolver.java:534)
at android.content.ContentResolver.query (ContentResolver.java:475)
我的代码
Cursor cursor =
resolver.query(MediaStore.Files.getContentUri("external"),
new String[] {BaseColumns._ID}, MediaStore.MediaColumns.DATA + " = ?",
new String[] {path}, MediaStore.MediaColumns.DATE_ADDED + " desc");