我正在开发一个在第一个活动中有谷歌地图的项目。当我关掉手机并重新启动它时,地图没有按照我的要求显示。它显示在世界级别。我得到以下logcat中的错误:
07-31 14:53:04.909: E/ActivityThread(2066): Service com.google.android.gms.checkin.CheckinService has leaked ServiceConnection gbd@4064bc48 that was originally bound here
07-31 14:53:04.909: E/ActivityThread(2066): android.app.ServiceConnectionLeaked: Service com.google.android.gms.checkin.CheckinService has leaked ServiceConnection gbd@4064bc48 that was originally bound here
07-31 14:53:04.909: E/ActivityThread(2066): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:938)
07-31 14:53:04.909: E/ActivityThread(2066): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:833)
07-31 14:53:04.909: E/ActivityThread(2066): at android.app.ContextImpl.bindService(ContextImpl.java:995)
07-31 14:53:04.909: E/ActivityThread(2066): at android.content.ContextWrapper.bindService(ContextWrapper.java:347)
07-31 14:53:04.909: E/ActivityThread(2066): at gbc.<init>(SourceFile:99)
07-31 14:53:04.909: E/ActivityThread(2066): at gay.<init>(SourceFile:226)
07-31 14:53:04.909: E/ActivityThread(2066): at java.lang.reflect.Constructor.constructNative(Native Method)
07-31 14:53:04.909: E/ActivityThread(2066): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
07-31 14:53:04.909: E/ActivityThread(2066): at xs.<init>(SourceFile:175)
07-31 14:53:04.909: E/ActivityThread(2066): at bkt.a(SourceFile:226)
07-31 14:53:04.909: E/ActivityThread(2066): at bks.a(SourceFile:298)
07-31 14:53:04.909: E/ActivityThread(2066): at bks.doInBackground(SourceFile:288)
07-31 14:53:04.909: E/ActivityThread(2066): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-31 14:53:04.909: E/ActivityThread(2066): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
07-31 14:53:04.909: E/ActivityThread(2066): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
07-31 14:53:04.909: E/ActivityThread(2066): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
07-31 14:53:04.909: E/ActivityThread(2066): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
07-31 14:53:04.909: E/ActivityThread(2066): at java.lang.Thread.run(Thread.java:1019)
如何解决上述错误。当我重新启动应用程序时问题就消失了。
答案 0 :(得分:0)
您正在调用已调用但尚未完成的异步方法。查看你的代码(看看你是否在start / create和之后调用它一次)并且可能添加一个标志来阻止这种情况发生。