导致应用崩溃的Android Memory Profiler潜在错误

时间:2018-12-28 21:28:15

标签: android android-studio react-native android-profiler

我的React Native应用程序具有一些本机实现,可在其中运行OpenCV和Tensorflow。没有,如果没有Android分析,则应用程序运行平稳且不会崩溃。启用Android分析后,调用本机函数后,应用程序将冻结并显示以下错误消息。

StudioProfiler: Studio Profilers encountered an unexpected error. 
Consider reporting a bug, including logcat output below.
   See also: https://developer.android.com/studio/report-bugs.html#studio-bugs

Could not track an OkHttp3 request
java.io.IOException: closed
    at okio.RealBufferedSink$1.write(RealBufferedSink.java:191)
    at com.facebook.react.modules.network.CountingOutputStream.write(CountingOutputStream.java:53)
    at com.facebook.react.modules.network.ProgressRequestBody$1.write(ProgressRequestBody.java:61)
    at okio.Okio$1.write(Okio.java:79)
    at okio.RealBufferedSink.flush(RealBufferedSink.java:216)
    at com.facebook.react.modules.network.ProgressRequestBody.writeTo(ProgressRequestBody.java:54)
    at com.android.tools.profiler.agent.okhttp.OkHttp3Interceptor.trackRequest(OkHttp3Interceptor.java:91)
    at com.android.tools.profiler.agent.okhttp.OkHttp3Interceptor.intercept(OkHttp3Interceptor.java:45)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179)
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:129)
    at okhttp3.internal.NamedRunnable.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)

然后,出现其他类似以下的警告,没有分析器时不会发生。

Skipped 80 frames!  The application may be doing too much work on its main thread.

0 个答案:

没有答案