(formerly) The mainactivity has leaked serviceconnection error when binding server under the Android system

Source: Internet
Author: User

Today under the official demo code under the Android system, we need to start a service and bind, but after the program starts, always error: Activity mainactivity has leaked serviceconnection Camerautil $[email protected]That is originally bound Hereandroid.app.ServiceConnectionLeaked:Activity mainactivity has leaked serviceconnection camerautil$[email protected]That is originally bound here error message as above, by Baidu learned that the appearance of this mainactivity has leaked serviceconnection,xxx is originally bound here reasons, many people say that the cause of this anomaly is in the activity destruction, Unbindservice is not called. So I in the activity of destory inside add unbindservice code, found or error, because in fact we have added Unbindservice in OnStop, so this is not our main cause of the error. After a few searches, the original is because I need to start in the program and binding server is not registered in the Androidmanifest.xml, so add the registration code is OK. Reprint Please specify Source: http://www.cnblogs.com/lihaiping/p/6120528.html

(formerly) The mainactivity has leaked serviceconnection error when binding server under the Android system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.