Nexus 7中Android 5.0上的严格模式错误

时间:2014-12-02 13:07:58

标签: android httpclient

我的应用程序在低于5的版本上运行良好。但是当我在版本5的Nexus 7上运行它时,它崩溃并出现以下错误消息

12-02 18:24:01.941: E/StrictMode(14686): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
12-02 18:24:01.941: E/StrictMode(14686): java.lang.Throwable: Explicit termination method 'close' not called
12-02 18:24:01.941: E/StrictMode(14686):    at dalvik.system.CloseGuard.open(CloseGuard.java:184)
12-02 18:24:01.941: E/StrictMode(14686):    at java.io.FileInputStream.<init>(FileInputStream.java:78)
12-02 18:24:01.941: E/StrictMode(14686):    at com.android.okhttp.internal.DiskLruCache.get(DiskLruCache.java:417)
12-02 18:24:01.941: E/StrictMode(14686):    at com.android.okhttp.HttpResponseCache.get(HttpResponseCache.java:164)
12-02 18:24:01.941: E/StrictMode(14686):    at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190)
12-02 18:24:01.941: E/StrictMode(14686):    at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
12-02 18:24:01.941: E/StrictMode(14686):    at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
12-02 18:24:01.941: E/StrictMode(14686):    at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491)
12-02 18:24:01.941: E/StrictMode(14686):    at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:199)
12-02 18:24:01.941: E/StrictMode(14686):    at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:315)
12-02 18:24:01.941: E/StrictMode(14686):    at android.media.MediaHTTPConnection.native_readAt(Native Method)
12-02 18:24:01.941: E/StrictMode(14686):    at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:304)
12-02 18:24:01.941: E/StrictMode(14686):    at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:72)

任何人都可以为此提出解决方案。

0 个答案:

没有答案