09-29 21:44:08. 557: Error/activitythread (31036): Activity XXX has leaked intentreceiver
Android. widget. zoombuttonscontroller $1 @ 419abcf0 that was originally registered here. Are you missing a call to unregisterreceiver ()?
09-29 21:44:08. 557: Error/activitythread (31036): Android. App. intentreceiverleaked: XXX has leaked intentreceiver
Android. widget. zoombuttonscontroller $1 @ 419abcf0 that was originally registered here. Are you missing a call to unregisterreceiver ()?
09-29 21:44:08. 917: Error/androidruntime (31036): Java. Lang. illegalargumentexception: runner Er not registered:
Android. widget. zoombuttonscontroller $1 @ 419abcf0
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. App. loadedapk. forgetreceiverdispatcher
(Fig. Java: 650)
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. App. contextimpl. unregisterreceiver
(Contextimpl. Java: 1091)
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. content. contextwrapper. unregisterreceiver
(Contextwrapper. Java: 354)
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. widget. zoombuttonscontroller. setvisible
(Zoombuttonscontroller. Java: 405)
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. widget. zoombuttonscontroller $2. handlemessage
(Zoombuttonscontroller. Java: 179)
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. OS. handler. dispatchmessage (handler. Java: 99)
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. OS. Looper. Loop (Looper. Java: 152)
09-29 21:44:08. 917: Error/androidruntime (31036): at Android. App. activitythread. Main (activitythread. Java: 4559)
09-29 21:44:08. 917: Error/androidruntime (31036): At java. Lang. Reflect. method. invokenative (native method)
09-29 21:44:08. 917: Error/androidruntime (31036): At java. Lang. Reflect. method. Invoke (method. Java: 491)
09-29 21:44:08. 917: Error/androidruntime (31036): At com. Android. Internal. OS. zygoteinit $ methodandargscaller. Run
(Maid. Java: 841)
09-29 21:44:08. 917: Error/androidruntime (31036): At com. Android. Internal. OS. zygoteinit. Main (zygoteinit. Java: 599)
09-29 21:44:08. 917: Error/androidruntime (31036): At Dalvik. system. nativestart. Main (native method)
Webview contains a zoombuttonscontroller. When web. getsettings (). setbuiltinzoomcontrols (true) is enabled, the scaling control icon appears once you touch the screen. This icon will automatically disappear in a few seconds, but on the 3.x system, if the icon exits the current activity before it disappears automatically, the above exceptions will be reported.
Based on the exception information, refer to the webview source code to know that zoombuttonscontroller has a register and unregister process. However, we cannot control these two processes. webview has APIs for display control, but we cannot access them. We can only access these items related to the control of zoombuttonscontroller:
Void setbuiltinzoomcontrols (Boolean enabled)
Void setdefaultzoom (websettings. zoomdensity zoom)
Void setdisplayzoomcontrols (Boolean enabled)
Void setsupportzoom (Boolean Support)
It does not work if you try it again.
Finally, let's look at the ultimate resolution solution.
Add the following sentence to ondestroy of the activity: Web. setvisibility (view. Gone); Set webview to gone.
In addition, this problem does not exist on 2.x.