我想检查一个图像的方向,所以我发现了一些代码,但它不起作用,因为光标始终为空。我的代码是
********** Crash dump: **********
Build fingerprint: 'Xiaomi/virgo/virgo:6.0.1/MMB29M/6.3.31:user/release-keys'
pid: 2610, tid: 2610,
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xca4007c8
Stack frame #00 pc 00049228 /system/lib/libc.so (arena_run_reg_alloc+87): Routine arena_run_reg_alloc at arena.c:?
Stack frame #01 pc 0004aff9 /system/lib/libc.so (je_arena_tcache_fill_small+104): Routine je_arena_tcache_fill_small at linux-atomic.c:?
Stack frame #02 pc 0005c32b /system/lib/libc.so (je_tcache_alloc_small_hard+18): Routine je_tcache_alloc_small_hard at linux-atomic.c:?
Stack frame #03 pc 00056e1d /system/lib/libc.so (je_malloc+1112): Routine je_malloc at linux-atomic.c:?
Stack frame #04 pc 00021773 /system/lib/libhwui.so: Routine ????:0
Stack frame #05 pc 0002e165 /system/lib/libhwui.so (android::uirenderer::DisplayListCanvas::drawRect(float, float, float, float, SkPaint const&)+156): Routine ????:0
Stack frame #06 pc 72ff926b /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x237a000)
但是cur总是返回null。我搜索了将文件转换为uri所以我找到了两个方法Uri.parse(f.toString()和Uri.fromFile(f)但没有一个工作。