Android Exception 12(has leaked ServiceConnection)

09-09 15:12:31.154: E/ActivityThread(18855): Activity com..xxx.xx.act.LoadingAct has leaked ServiceConnection [email protected] that was originally bound here

09-09 15:12:31.154: E/ActivityThread(18855): android.app.ServiceConnectionLeaked: Activity com.xxx.xx.act.LoadingAct has leaked ServiceConnection [email protected] that was originally bound here

09-09 15:12:31.154: E/ActivityThread(18855):     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:977)

09-09 15:12:31.154: E/ActivityThread(18855):     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:871)

09-09 15:12:31.154: E/ActivityThread(18855):     at android.app.ContextImpl.bindService(ContextImpl.java:1237)

09-09 15:12:31.154: E/ActivityThread(18855):     at android.app.ContextImpl.bindService(ContextImpl.java:1229)

09-09 15:12:31.154: E/ActivityThread(18855):     at android.content.ContextWrapper.bindService(ContextWrapper.java:394)

09-09 15:12:31.154: E/ActivityThread(18855):     at com.tongyan.changli.act.LoadingAct$12.onClick(LoadingAct.java:387)

09-09 15:12:31.154: E/ActivityThread(18855):     at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)

09-09 15:12:31.154: E/ActivityThread(18855):     at android.os.Handler.dispatchMessage(Handler.java:99)

09-09 15:12:31.154: E/ActivityThread(18855):     at android.os.Looper.loop(Looper.java:137)

09-09 15:12:31.154: E/ActivityThread(18855):     at android.app.ActivityThread.main(ActivityThread.java:4815)

09-09 15:12:31.154: E/ActivityThread(18855):     at java.lang.reflect.Method.invokeNative(Native Method)

09-09 15:12:31.154: E/ActivityThread(18855):     at java.lang.reflect.Method.invoke(Method.java:511)

09-09 15:12:31.154: E/ActivityThread(18855):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)

09-09 15:12:31.154: E/ActivityThread(18855):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)

09-09 15:12:31.154: E/ActivityThread(18855):     at dalvik.system.NativeStart.main(Native Method)

错误原因:AndroidManifest.xml Service的文件包名出现与实际的不一致

时间: 2024-10-08 13:34:05

Android Exception 12(has leaked ServiceConnection)的相关文章

(原)android系统下绑定Server的时候报MainActivity has leaked ServiceConnection的错误

今天在android系统下根据官方的demo代码,我们需要启动一个服务,并绑定,但在程序启动以后,老是报错: Activity MainActivity has leaked ServiceConnection CameraUtil$[email protected] that was originally bound here android.app.ServiceConnectionLeaked: Activity MainActivity has leaked ServiceConnect

Service &amp; Timer &amp; Handler &amp; leaked ServiceConnection

定义一个Service,每隔一秒钟,变量count增加1: 在Activity里bindService,然后利用new Timer() 和 Handler,每隔一秒利用IBinder实例mBinder的getNumber()方法读取count的最新值,并显示在TextView. 首次运行,报错. Debug模式,发现MainActivity.class 79行的HandleMessage()方法在onServiceConnected()(MainActivity.class 第68行)之前就执行

has leaked ServiceConnection com.baidu.location.LocationClient

02-06 05:01:52.806: E/ActivityThread(1120): Activity com.project.xxxActivity [email protected] that was originally bound here 02-06 05:01:52.806: E/ActivityThread(1120): android.app.ServiceConnectionLeaked: Activity com.project.main.xxxActivity has l

解决has leaked ServiceConnection [email&#160;protected]

解决"has leaked ServiceConnection [email protected] that was originally bound here"的错误,需要修改AndroidManifest.xml文件. 配置Map定位权限和远程链接机制.不然,就会报下面的错误: has leaked ServiceConnection [email protected] that was originally bound here android.app.ServiceConnec

Android Exception 7(attempt to re-open an already-closed object )

07-23 18:16:17.641: W/SQLiteConnectionPool(28390): A SQLiteConnection object for database '/storage/emulated/0/cnOA.db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer ne

Android Exception 11(baidumapsdk(15405): Authentication Error errorcode: 102 uid)

08-12 16:06:12.622: E/baidumapsdk(15405): Authentication Error errorcode: 102 uid: null appid -1 msg: IP/SN/SCODE/REFERER Illegal: http://bbs.lbsyun.baidu.com/viewthread.php?tid=9392 先看下这个贴,弄了半天,最后把调试用的debug.keystore换成发布用的.keystore换个名字.对这个功能还需要嗤之以鼻?

Android Exception 13(Can&#39;t create handler inside thread that has not called Looper.prepare())

10-12 17:02:55.500: E/AndroidRuntime(28343): FATAL EXCEPTION: Timer-2 10-12 17:02:55.500: E/AndroidRuntime(28343): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() 10-12 17:02:55.500: E/AndroidRuntim

Android Exception 9(requestFeature() must be called before adding content)

08-05 17:36:12.799: W/System.err(10378): java.lang.reflect.InvocationTargetException08-05 17:36:12.799: W/System.err(10378):     at java.lang.reflect.Method.invokeNative(Native Method)08-05 17:36:12.809: W/System.err(10378):     at java.lang.reflect.

Android Exception 10((server)&#39; ~ Channel is unrecoverably broken and will be disposed!)

08-11 19:22:35.028: W/MemoryDealer(2123): madvise(0x43e16000, 12288, MADV_REMOVE) returned Operation not supported on transport endpoint 08-11 19:22:35.038: W/InputDispatcher(2714): channel '4236b890 com.tongyan.activity/com.tongyan.activity.SettingA