Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在debug模式下,使用r_upgrade后,每退出一次app都报一次错误 #15

Closed
zhongyinghe opened this issue Jul 4, 2020 · 5 comments

Comments

@zhongyinghe
Copy link

1、使用版本为: ^0.3.1

2、错误的信息为:
Activity com.xxx.MainActivity has leaked IntentReceiver com.example.r_upgrade.common.UpgradeManager$3@ba42023 that was originally registered here. Are you missing a call to unregisterReceiver()?

E/ActivityThread(18075): android.app.IntentReceiverLeaked: Activity com.xxx.MainActivity
has leaked IntentReceiver com.example.r_upgrade.common.UpgradeManager$3@ba42023 that was originally registered here.
Are you missing a call to unregisterReceiver()?

3、希望作者能解决这个问题

注: 感觉您这个插件蛮好用的

@rhymelph
Copy link
Owner

rhymelph commented Aug 7, 2020

贴一下你的Flutter版本

@jcleng
Copy link

jcleng commented Aug 24, 2020

@rhymelph 这个

 r_upgrade: ^0.3.1
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.19.0-1.0.pre.17, on Microsoft Windows [Version 10.0.17763.914], locale zh-CN)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[√] Chrome - develop for the web
[√] Android Studio (version 3.6)
[√] VS Code (version 1.48.1)
[√] Connected device (3 available)
D/r_upgrade.Service(11196): handlerDownloadFinish: finish
D/r_upgrade.AsyncTask(11196): content://com.xxx.xxxx.app.fileProvider/external_storage_root/Download/app_tk-1.2.apk
D/r_upgrade.AsyncTask(11196): content://com.xxx.xxxx.app.fileProvider/external_storage_root/Download/app_tk-1.2.apk
D/JIGUANG-JCore(11196): [JCoreHelper] runActionWithService action:change_foreground
D/JIGUANG-JCore(11196): [JCoreHelper] runActionWithService action:change_foreground
D/JIGUANG-JCore(11196): [JCoreHelper] runActionWithService action:notification_state
D/JIGUANG-JCore(11196): [JCoreHelper] runActionWithService action:change_foreground
V/MicroMsg.SDK.DiffDevOAuthFactory(11196): getDiffDevOAuth, version = 1
D/r_upgrade.Service(11196): handlerDownloadPause: downloadFile:/storage/emulated/0/Download/app_tk-1.2.apk
I/Choreographer(11196): Skipped 62 frames!  The application may be doing too much work on its main thread.
W/Looper  (11196): Slow Frame: doFrame is 1041ms late
E/ActivityThread(11196): Activity com.xxx.xxxx.app.MainActivity has leaked IntentReceiver com.example.r_upgrade.common.UpgradeManager$3@15b207f that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(11196): android.app.IntentReceiverLeaked: Activity com.xxx.xxxx.app.MainActivity has leaked IntentReceiver com.example.r_upgrade.common.UpgradeManager$3@15b207f that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(11196):        at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1359)
E/ActivityThread(11196):        at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1136)
E/ActivityThread(11196):        at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1431)
E/ActivityThread(11196):        at android.app.ContextImpl.registerReceiver(ContextImpl.java:1404)
E/ActivityThread(11196):        at android.app.ContextImpl.registerReceiver(ContextImpl.java:1392)
E/ActivityThread(11196):        at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:619)
E/ActivityThread(11196):        at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:619)
E/ActivityThread(11196):        at com.example.r_upgrade.common.UpgradeManager.<init>(UpgradeManager.java:90)
E/ActivityThread(11196):        at com.example.r_upgrade.RUpgradePlugin.<init>(RUpgradePlugin.java:39)
E/ActivityThread(11196):        at com.example.r_upgrade.RUpgradePlugin.onAttachedToActivity(RUpgradePlugin.java:70)
E/ActivityThread(11196):        at io.flutter.embedding.engine.FlutterEnginePluginRegistry.add(FlutterEnginePluginRegistry.java:143)
E/ActivityThread(11196):        at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:32)
E/ActivityThread(11196):        at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread(11196):        at io.flutter.embedding.android.FlutterActivity.registerPlugins(FlutterActivity.java:972)
E/ActivityThread(11196):        at io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(FlutterActivity.java:873)
E/ActivityThread(11196):        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:178)
E/ActivityThread(11196):        at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:409)
E/ActivityThread(11196):        at android.app.Activity.performCreate(Activity.java:7088)
E/ActivityThread(11196):        at android.app.Activity.performCreate(Activity.java:7079)
E/ActivityThread(11196):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
E/ActivityThread(11196):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
E/ActivityThread(11196):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2895)
E/ActivityThread(11196):        at android.app.ActivityThread.-wrap11(Unknown Source:0)
E/ActivityThread(11196):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1616)
E/ActivityThread(11196):        at android.os.Handler.dispatchMessage(Handler.java:106)
E/ActivityThread(11196):        at android.os.Looper.loop(Looper.java:176)
E/ActivityThread(11196):        at android.app.ActivityThread.main(ActivityThread.java:6651)
E/ActivityThread(11196):        at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread(11196):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/ActivityThread(11196):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
W/FlutterJNI(11196): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: com.rhyme/r_upgrade_method. Response ID: 0
D/ViewContentFactory(11196): initViewContentFetcherClass

@liwenbing0745
Copy link

同样出现这个问题

@inquick
Copy link

inquick commented Jun 28, 2021

r_upgrade: ^0.3.3 同样遇到这个问题。

还没有解决这个问题吗?或者说这个问题影响app的正常使用吗?

rhymelph added a commit that referenced this issue Jun 29, 2021
rhymelph added a commit that referenced this issue Jun 29, 2021
@rhymelph
Copy link
Owner

fixed in v0.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants