应用程序停止在GenyMotion上

时间:2015-10-04 11:28:52

标签: java android genymotion forceclose

我使用Genymotion来测试我的应用程序。一切都很好,直到我决定改变窗户。所以我改变了我的窗口并开始安装应用程序以及Genymotion。

但是因为我想随时更改Windows我想在Genymotion上运行我的应用程序(我在android studio中创建的应用程序),我强行关闭,我不知道为什么。

我在网上搜索但没有得到任何有用的答案。

我该如何解决这个问题?

我的Logcat:

10-04 05:41:01.944    2597-2597/org.persianrap.aliakhgar D/Sentry﹕    Adding request - e426abdc-b680-4917-9ab5-32270a189043 #R 271
10-04 05:41:02.065    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp   target GC heap from 97MB to 96MB
10-04 05:41:02.124    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 110MB to 96MB
10-04 05:41:02.153    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 111MB to 96MB
10-04 05:41:02.200    2597-2597/org.persianrap.aliakhgar D/Sentry﹕ Adding request - 7f23d887-a032-4106-b45d-0eec6b6b3486 #R 272
10-04 05:41:02.211    2597-2597/org.persianrap.aliakhgar I/art﹕ Alloc  partial concurrent mark sweep GC freed 3895(184KB) AllocSpace objects,   4(41MB) LOS objects, 22% free, 54MB/70MB, paused 55us total 7.144ms
10-04 05:41:02.396    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 97MB to 96MB
10-04 05:41:02.464    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 110MB to 96MB
10-04 05:41:02.485    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 111MB to 96MB
10-04 05:41:02.529    2597-2597/org.persianrap.aliakhgar D/Sentry﹕  Adding request - f7871860-de44-4281-9ea3-5d5135e0bb3d #R 273
10-04 05:41:02.705    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 97MB to 96MB
10-04 05:41:02.759    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 110MB to 96MB
10-04 05:41:02.782    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 111MB to 96MB
10-04 05:41:02.825    2597-2597/org.persianrap.aliakhgar D/Sentry﹕ Adding request - eec764ad-0561-4413-8000-425119e47a04 #R 274
10-04 05:41:02.836    2597-2597/org.persianrap.aliakhgar I/art﹕ WaitForGcToComplete blocked for 10.363ms for cause Alloc
10-04 05:41:03.008    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 97MB to 96MB
10-04 05:41:03.058    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 110MB to 96MB
10-04 05:41:03.078    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 111MB to 96MB
10-04 05:41:03.140    2597-2597/org.persianrap.aliakhgar I/art﹕ WaitForGcToComplete blocked for 18.718ms for cause Alloc
10-04 05:41:03.141    2597-2597/org.persianrap.aliakhgar D/Sentry﹕ Adding request - 86e198d8-8678-4bab-8080-fddfa99b1057 #R 275
10-04 05:41:03.329    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 97MB to 96MB
10-04 05:41:03.376    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 110MB to 96MB
10-04 05:41:03.397    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 111MB to 96MB
10-04 05:41:03.445    2597-2597/org.persianrap.aliakhgar D/Sentry﹕ Adding request - 5df4352f-2924-4cef-b2c2-0612224195f0 #R 276
10-04 05:41:03.622    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 97MB to 96MB
10-04 05:41:03.672    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 110MB to 96MB
10-04 05:41:03.698    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 111MB to 96MB
10-04 05:41:03.747    2597-2597/org.persianrap.aliakhgar D/Sentry﹕ Adding request - 650c88b3-397b-4231-860c-c42659eda941 #R 277
10-04 05:41:03.932    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 97MB to 96MB
10-04 05:41:03.993    2597-2609/org.persianrap.aliakhgar I/art﹕ Clamp target GC heap from 110MB to 96MB
10-04 05:41:04.018    2597-2597/org.persianrap.aliakhgar I/art﹕ Forcing collection of SoftReferences for 17MB allocation
10-04 05:41:04.024    2597-2597/org.persianrap.aliakhgar I/art﹕ Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects,     16% free, 78MB/94MB, paused 67us total 5.219ms
10-04 05:41:04.024    2597-2597/org.persianrap.aliakhgar E/art﹕ Throwing OutOfMemoryError "Failed to allocate a 18275370 byte allocation with 16777216 free bytes and 17MB until OOM"
10-04 05:41:04.024    2597-2597/org.persianrap.aliakhgar D/AndroidRuntime﹕ Shutting down VM
10-04 05:41:04.024    2597-2597/org.persianrap.aliakhgar E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: org.persianrap.aliakhgar, PID: 2597
java.lang.OutOfMemoryError: Failed to allocate a 18275370 byte   allocation with 16777216 free bytes and 17MB until OOM
        at java.lang.String.<init>(String.java:400)
        at   java.lang.AbstractStringBuilder.toString(AbstractStringBuilder.java:633)
        at java.lang.StringBuilder.toString(StringBuilder.java:663)
        at org.json.JSONStringer.toString(JSONStringer.java:430)
        at org.json.JSONArray.toString(JSONArray.java:586)
        at co.ronash.pushe.util.d.a(Unknown Source)
        at co.ronash.pushe.db.b.b(Unknown Source)
        at co.ronash.pushe.log.l.a(Unknown Source)
        at co.ronash.pushe.log.l.a(Unknown Source)
        at co.ronash.pushe.log.i.a(Unknown Source)
        at co.ronash.pushe.log.handlers.SentryHandler.a(Unknown Source)
        at co.ronash.pushe.log.h.e(Unknown Source)
        at co.ronash.pushe.log.h.a(Unknown Source)
        at co.ronash.pushe.log.h.c(Unknown Source)
        at co.ronash.pushe.a.a(Unknown Source)
        at co.ronash.pushe.a.c(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.log.i.d(Unknown Source)
        at co.ronash.pushe.log.i.a(Unknown Source)
        at co.ronash.pushe.log.handlers.SentryHandler.a(Unknown Source)
        at co.ronash.pushe.log.h.e(Unknown Source)
        at co.ronash.pushe.log.h.a(Unknown Source)
        at co.ronash.pushe.log.h.c(Unknown Source)
        at co.ronash.pushe.a.a(Unknown Source)
        at co.ronash.pushe.a.c(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.log.i.d(Unknown Source)
        at co.ronash.pushe.log.i.a(Unknown Source)
        at co.ronash.pushe.log.handlers.SentryHandler.a(Unknown Source)
        at co.ronash.pushe.log.h.e(Unknown Source)
        at co.ronash.pushe.log.h.a(Unknown Source)
        at co.ronash.pushe.log.h.c(Unknown Source)
        at co.ronash.pushe.a.a(Unknown Source)
        at co.ronash.pushe.a.c(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.log.i.d(Unknown Source)
        at co.ronash.pushe.log.i.a(Unknown Source)
        at co.ronash.pushe.log.handlers.SentryHandler.a(Unknown Source)
        at co.ronash.pushe.log.h.e(Unknown Source)
        at co.ronash.pushe.log.h.a(Unknown Source)
        at co.ronash.pushe.log.h.c(Unknown Source)
        at co.ronash.pushe.a.a(Unknown Source)
        at co.ronash.pushe.a.c(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.log.i.d(Unknown Source)
        at co.ronash.pushe.log.i.a(Unknown Source)
        at co.ronash.pushe.log.handlers.SentryHandler.a(Unknown Source)
        at co.ronash.pushe.log.h.e(Unknown Source)
        at co.ronash.pushe.log.h.a(Unknown Source)
        at co.ronash.pushe.log.h.c(Unknown Source)
        at co.ronash.pushe.a.a(Unknown Source)
        at co.ronash.pushe.a.c(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.log.i.d(Unknown Source)
        at co.ronash.pushe.log.i.a(Unknown Source)
        at co.ronash.pushe.log.handlers.SentryHandler.a(Unknown Source)
        at co.ronash.pushe.log.h.e(Unknown Source)
        at co.ronash.pushe.log.h.a(Unknown Source)
        at co.ronash.pushe.log.h.c(Unknown Source)
        at co.ronash.pushe.a.a(Unknown Source)
        at co.ronash.pushe.a.c(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.log.i.d(Unknown Source)
        at co.ronash.pushe.log.i.a(Unknown Source)
        at co.ronash.pushe.log.handlers.SentryHandler.a(Unknown Source)
        at co.ronash.pushe.log.h.e(Unknown Source)
        at co.ronash.pushe.log.h.a(Unknown Source)
        at co.ronash.pushe.log.h.c(Unknown Source)
        at co.ronash.pushe.a.a(Unknown Source)
        at co.ronash.pushe.a.c(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown Source)
        at co.ronash.pushe.task.i.a(Unknown So
10-04 05:41:05.935    2597-2597/org.persianrap.aliakhgar I/Process﹕ Sending   signal. PID: 2597 SIG: 9

1 个答案:

答案 0 :(得分:1)

将它放入你的清单并尝试

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:theme="@style/AppTheme" >

android:largeHeap="true"很重要,请添加

你遇到java.lang.OutOfMemoryError: Failed to allocate a 18275370 byte allocation with 16777216 free bytes and 17MB until OOM错误,这意味着你已经没有堆内存了

或者您可能未必在genny模拟器中安装Google Play服务