在启用Crashlytics时,会导致资源泄漏

时间:2015-10-12 06:36:03

标签: android crashlytics resource-leak android-strictmode

Hiii,我已经为错误报告添加了crashlytics,当我启用严格模式时,我收到资源泄漏。知道我哪里错了,

A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
    at dalvik.system.CloseGuard.open(CloseGuard.java:184)
    at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:271)
    at com.android.okhttp.Connection.upgradeToTls(Connection.java:197)
    at com.android.okhttp.Connection.connect(Connection.java:151)
    at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
    at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
    at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
    at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
    at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
    at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
    at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
    at io.fabric.sdk.android.services.network.HttpRequest.openOutput(HttpRequest.java:2449)
    at io.fabric.sdk.android.services.network.HttpRequest.startPart(HttpRequest.java:2462)
    at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2654)
    at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2616)
    at com.crashlytics.android.answers.SessionAnalyticsFilesSender.send(SessionAnalyticsFilesSender.java:45)
    at com.crashlytics.android.answers.AnswersRetryFilesSender.send(AnswersRetryFilesSender.java:49)
    at io.fabric.sdk.android.services.events.EnabledEventsStrategy.sendAndCleanUpIfSuccess(EnabledEventsStrategy.java:158)
    at io.fabric.sdk.android.services.events.EnabledEventsStrategy.sendEvents(EnabledEventsStrategy.java:67)
    at com.crashlytics.android.answers.AnswersEventsHandler$3.run(AnswersEventsHandler.java:114)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
    at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
    at java.lang.Thread.run(Thread.java:818)

为了调试我已经禁用了崩溃剂 - 关于申请

Crashlytics crashlyticsKit = new Crashlytics.Builder()
        .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
        .build();
Fabric.with(this, crashlyticsKit);

和build.gradle

ext.enableCrashlytics = false

0 个答案:

没有答案