7

こんにちは、エラー レポート用に crashlytics を追加しましたが、strict モードを有効にすると、リソース リークが発生します。どこが間違っているのか、

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を無効にしました-On Application

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

そしてbuild.gradleで

ext.enableCrashlytics = false
4

0 に答える 0