gpt4 book ai didi

android - 使用 Espresso 测试应用程序时出现 "Native crash"

转载 作者:行者123 更新时间:2023-12-02 18:04:46 27 4
gpt4 key购买 nike

当我使用 Espresso 通过 Virtualbox 模拟器在 Android-x86 上测试 Android 应用程序时,随机出现“ native 崩溃”。我相信这与内存有关,但我不确定。有人知道吗?谢谢。

这是来自 logcat 的日志:

11-03 10:59:42.430 2337-2337/com.myApp.mobile I/ViewInteraction: Performing 'single click' action on view with id: com.myApp.mobile:id/radio_PN
11-03 10:59:42.510 2337-2337/com.myApp.mobile A/libc: Fatal signal 11 (SIGSEGV) at 0x8bb55ffc (code=2), thread 2337 (ile.mobile)
11-03 10:59:42.620 932-932/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-03 10:59:42.620 932-932/? I/DEBUG: Build fingerprint: 'Android-x86/android_x86/x86:4.3/JSS15J/eng.cwhuang.20130725.203820:userdebug/test-keys'
11-03 10:59:42.620 932-932/? I/DEBUG: Revision: '0'
11-03 10:59:42.620 932-932/? I/DEBUG: pid: 2337, tid: 2337, name: ile.medicineapp >>> com.myApp.mobile <<<
11-03 10:59:42.620 932-932/? I/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 8bb55ffc
11-03 10:59:42.780 932-932/? I/DEBUG: eax 8bb55000 ebx b6d55c90 ecx 00000400 edx 001d4c00
11-03 10:59:42.780 932-932/? I/DEBUG: esi 8a64dffc edi 8bb55ffc
11-03 10:59:42.780 932-932/? I/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
11-03 10:59:42.780 932-932/? I/DEBUG: eip b764b60d ebp 8a64d000 esp bffac604 flags 00210686
11-03 10:59:42.780 932-932/? I/DEBUG: backtrace:
11-03 10:59:42.780 932-932/? I/DEBUG: #00 pc 0002f60d /system/lib/libc.so
11-03 10:59:42.780 932-932/? I/DEBUG: #01 pc 00024fff /dev/ashmem/dalvik-jit-code-cache (deleted)
11-03 10:59:42.780 932-932/? I/DEBUG: stack:
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5c4 00000320
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5c8 00000480
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5cc bffac6ac [stack]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5d0 b8b3a080 [heap]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5d4 b8b3a090 [heap]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5d8 b75f0608 /system/lib/libutils.so
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5dc 00000000
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5e0 00000000
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5e4 00000320
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5e8 00000480
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5ec 00000480
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5f0 bffac698 [stack]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5f4 bffac774 [stack]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5f8 b6d6de29 /system/lib/libui.so (android::Region::subtract(android::Region const&) const+9)
11-03 10:59:42.780 932-932/? I/DEBUG: bffac5fc b6d55c90 /system/lib/libgui.so
11-03 10:59:42.780 932-932/? I/DEBUG: bffac600 46505845
11-03 10:59:42.780 932-932/? I/DEBUG: #00 bffac604 8bb55000 /dev/ashmem/gralloc-buffer (deleted)
11-03 10:59:42.780 932-932/? I/DEBUG: bffac608 00000000
11-03 10:59:42.780 932-932/? I/DEBUG: bffac60c b6d32ef7 /system/lib/libgui.so (_ZN7android7Surface4lockEP20ANativeWindow_BufferP5ARect.part.8+1687)
11-03 10:59:42.780 932-932/? I/DEBUG: bffac610 8bb55000 /dev/ashmem/gralloc-buffer (deleted)
11-03 10:59:42.780 932-932/? I/DEBUG: bffac614 8a64d000 /dev/ashmem/gralloc-buffer (deleted)
11-03 10:59:42.780 932-932/? I/DEBUG: bffac618 001d4c00
11-03 10:59:42.780 932-932/? I/DEBUG: bffac61c bffac674 [stack]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac620 005fd110
11-03 10:59:42.780 932-932/? I/DEBUG: bffac624 b85ff220 [heap]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac628 b76b5568
11-03 10:59:42.780 932-932/? I/DEBUG: bffac62c 00000000
11-03 10:59:42.780 932-932/? I/DEBUG: bffac630 b8ad4780 [heap]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac634 001d4c00
11-03 10:59:42.780 932-932/? I/DEBUG: bffac638 bffac6ac [stack]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac63c b8b257f0 [heap]
11-03 10:59:42.780 932-932/? I/DEBUG: bffac640 00000c80
11-03 10:59:42.780 932-932/? I/DEBUG: memory map around fault addr 8bb55ffc:
11-03 10:59:42.780 932-932/? I/DEBUG: 8bb30000-8bb55000 r-x /dev/ashmem/dalvik-jit-code-cache (deleted)
11-03 10:59:42.780 932-932/? I/DEBUG: 8bb55000-8bb56000 r-x /dev/ashmem/gralloc-buffer (deleted)
11-03 10:59:42.780 932-932/? I/DEBUG: 8bb56000-8bed9000 rw- /dev/ashmem/gralloc-buffer (deleted)
11-03 10:59:42.810 1068-2415/system_process W/ActivityManager: Error in app com.myApp.mobile running instrumentation ComponentInfo{com.myApp.mobile.androidTest/android.support.test.runner.AndroidJUnitRunner}:
11-03 10:59:42.810 1068-2415/system_process W/ActivityManager: Native crash

最佳答案

您认为这是与内存相关的崩溃,这是正确的。我以前在 AVD 上也遇到过同样的问题。

我尝试增加内存但没有帮助,所以我最终使用了 Genymotion 模拟器。

在您走这条路之前,我还建议检查您是否使用正确的 .apk 文件。我获得了armeabi.apk和x86.apk,但我使用了错误的.apk,这也导致了我的一些崩溃。

关于android - 使用 Espresso 测试应用程序时出现 "Native crash",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40398954/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com