【问题标题】:Genymotion: "Unfortunately <app> has stopped"Genymotion:“不幸的是 <app> 已停止”
【发布时间】:2016-05-16 03:40:39
【问题描述】:

我在 React Native 中创建了一个在 iOS 中运行良好的应用程序。我已将代码复制到其中的 Android 部分,并分离出特定于平台的组件。当我点击某个组件时,应用程序崩溃并显示“不幸已停止”。

没有日志,控制台中没有错误,什么都没有。我要寻找什么,我可以在哪里寻找?日志?代码中的某个地方?

在 ~/genymotion-log/Google Nexus 6<...>-logcat.txt 中,我看到以下内容:

05-15 23:50:14.379 D/OpenGLRenderer(  620): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-15 23:50:14.380 D/Atlas   (  620): Validating map...
05-15 23:50:14.429 I/OpenGLRenderer(  620): Initialized EGL, version 1.4
05-15 23:50:14.429 D/        (  620): HostConnection::get() New Host Connection established 0xaf31ca40, tid 1876
05-15 23:50:14.463 D/OpenGLRenderer(  620): Enabling debug mode 0
05-15 23:50:14.489 W/EGL_emulation(  620): eglSurfaceAttrib not implemented
05-15 23:50:14.490 W/OpenGLRenderer(  620): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9e45dfc0, error=EGL_SUCCESS
05-15 23:50:14.490 W/EGL_emulation(  941): eglSurfaceAttrib not implemented
05-15 23:50:14.490 W/OpenGLRenderer(  941): Failed to set EGL_SWAP_BEHAVIOR on surface 0xb43e44a0, error=EGL_SUCCESS
05-15 23:50:14.952 I/ActivityManager(  620): Killing 1492:com.android.onetimeinitializer/u0a10 (adj 15): empty #17
05-15 23:50:15.219 W/OpenGLRenderer(  941): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
05-15 23:50:15.440 W/ResourceType(  724): No package identifier when getting value for resource number 0x00000000
05-15 23:50:15.442 W/PackageManager(  724): Failure retrieving resources for com.bidsmart: Resource ID #0x0
05-15 23:50:18.400 W/AudioTrack(  620): AUDIO_OUTPUT_FLAG_FAST denied by client
05-15 23:50:18.424 I/Process ( 1805): Sending signal. PID: 1805 SIG: 9
05-15 23:50:18.463 D/OpenGLRenderer(  620): endAllStagingAnimators on 0xa1a6f780 (RippleDrawable) with handle 0xaf3be470
05-15 23:50:18.468 I/ActivityManager(  620): Process com.bidsmart (pid 1805) has died
05-15 23:50:18.472 W/InputMethodManagerService(  620): Got RemoteException sending setActive(false) notification to pid 1805 uid 10061

【问题讨论】:

  • 您是否尝试在您的应用程序@Nathan Hyland 中连接端口。
  • 不确定这意味着什么,真的。物理端口?需要明确的是,该应用程序可以正常工作,直到您点击其中一个组件,该组件还有一些嵌套。
  • Yes@ Nathan Hyland
  • 不。 ,只是显示一个滚动视图。
  • 在调试android应用时,可以使用命令'adb logcat'查看本地应用层的日志,在定位问题时很有用

标签: android react-native genymotion


【解决方案1】:

没有解决办法,但原因是我将太多数据从服务器推送到客户端。一旦我运行 adb logcat,我得到了这个:

java.lang.OutOfMemoryError: Failed to allocate a 2470012 byte allocation with 48508 free bytes and 47KB until OOM

事实证明,我将我的图像一遍又一遍地推送给客户端,直到它崩溃。 iOS 可以处理它,但 RN 不能。

StackOverflow 相关线程的链接:Android:java.lang.OutOfMemoryError: Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-18
    • 2014-10-23
    • 2014-07-20
    • 1970-01-01
    • 2016-07-21
    • 1970-01-01
    相关资源
    最近更新 更多