Resolving java.lang.Throwable exception in an android

前端 未结 1 1851
隐瞒了意图╮
隐瞒了意图╮ 2021-01-27 00:26

I am working on an android application which has a sqlite database. After writing the code in my app related to database operation, I am getting below exception. Though my appli

相关标签:
1条回答
  • 2021-01-27 00:43

    Like the log says:

    A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.

    Explicit termination method 'close' not called

    Note that the callstack shows where the resource was created. The message is printed when the resource is garbage-collected and it notices that it wasn't closed.

    In your case, we can see that the resource is a ParcelFileDescriptor, and it was created automatically by the IBackupAgent$Stub.onTransact() method (i.e., when your BackupAgent is getting a call through binder).

    The log should disappear if you make sure to close the ParcelFileDescriptors passed to your BackupAgent subclass.

    0 讨论(0)
提交回复
热议问题