我正在使用axios向api请求,获取结果后,应用程序崩溃。我提到请求仅返回json文本。
请求成功完成,promise返回成功,唯一的问题是,应用程序崩溃时没有调试日志,只有提供的logcat日志。
Process: host.exp.exponent, PID: 23720
java.lang.OutOfMemoryError: Failed to allocate a 25090000 byte allocation with 6291456 free bytes and 18MB until OOM, max allowed footprint 390069440, growth limit 402653184
at java.lang.StringBuilder.toString(StringBuilder.java:410)
at android.util.JsonReader.nextString(JsonReader.java:894)
at android.util.JsonReader.nextValue(JsonReader.java:708)
at android.util.JsonReader.objectValue(JsonReader.java:691)
at android.util.JsonReader.peek(JsonReader.java:347)
at abi31_0_0.com.facebook.react.devsupport.JSDebuggerWebSocketClient.onMessage(JSDebuggerWebSocketClient.java:187)
at expolib_v1.a.a.i.a.b(RealWebSocket.java:307)
at expolib_v1.a.a.i.c.e(WebSocketReader.java:222)
at expolib_v1.a.a.i.c.a(WebSocketReader.java:101)
at expolib_v1.a.a.i.a.b(RealWebSocket.java:262)
at expolib_v1.a.a.i.a$2.onResponse(RealWebSocket.java:201)
at expolib_v1.a.y$a.c(RealCall.java:135)
at expolib_v1.a.a.b.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
我希望它能工作...相反,我收到此错误消息。