Post your manifest.xml. I assume that you have your broadcastreceiver or 
some service running in a separate process. That would cause 
Application.onCreate to be called multiple times.

On Saturday, November 10, 2012 3:32:42 PM UTC-6, Craig wrote:
>
> I received an error because I'm doing something (init'ing ACRA) in my 
> overridden Application class' onCreate, and I expected this method to be 
> called only once. I think I have a clue as to what is happening - I see 
> multiple logcat lines like: "Force stopping package ...." for my package 
> close together, for example:
> 11-09 11:53:40.394
> 11-09 11:53:40.744
> 11-09 11:53:41.364
>
> I am using a Service, but only through onHandleIntent, and I did not 
> register it to run in a separate process. 
>
> My theory is that I'm holding onto some reference which is preventing my 
> app from being stopped (and garbage collected).
>
> Does this make sense? If it does, is there a good way to track down what 
> reference or references could be causing this? My app is rather large 
> (about a dozen activities, a handful of async tasks, a few 
> broadcasters/receivers, etc.), so I was really hoping for a good way to 
> track these down. 
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to