我的活动被泄漏,但我收到了通知,即使活动全部为空。
这是跟踪:
ApplicationLeak(classname=com.bcx.tracker.ui.login.Loginactivity,leakTrace=
┬
├─ android.app.activity$1
│ Leaking: UNKNOWN
│ Anonymous subclass of android.app.IRequestFinishCallback$Stub
│ GC Root: Global variable in native code
│ ↓ activity$1.this$0
│ ~~~~~~
╰→ com.bcx.tracker.ui.login.Loginactivity
Leaking: YES (activity#mDestroyed is true and ObjectWatcher was watching this)
key = fc3d8e13-c51c-4ff8-995f-4e0da90f085b
watchDurationmillis = 7889
retainedDurationmillis = 2886
key = b809b94b-fd3c-4d26-bda4-7f175624c3c3,retainedHeapByteSize=166095)
我刚刚在build.gradle
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-3'
这里有什么我想念的吗?。
我经历了this stackoverflow link,但没有帮助。
我的设备:
OnePlus 7,Android 10
模拟器,Android 10