Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

E/ActivityThread(  655): Activity com.android.internal.app.ChooserActivity has
leaked IntentReceiver com.android.internal.app.ResolverActivity$1@412f4f38 
that was originally registered here. 

Are you missing a call to unregisterReceiver()? E/ActivityThread(  655): 
android.app.IntentReceiverLeaked: 
Activity com.android.internal.app.ChooserActivity has leaked IntentReceiver 
com.android.internal.app.ResolverActivity$1@412f4f38 that was originally 
registered here. Are you missing a call to unregisterReceiver()?
  1. What does this error mean?
  2. Since the application continues working should I ignore it?
  3. How can I fix it?

It occurs when I choose an image from the phone Gallery following the routine posted here. Precisely when I press the Browse Gallery Button defined in the layout of the Activity.


Full LOGCAT:

E/ActivityThread(  655):    at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:763)
E/ActivityThread(  655):    at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:567)
E/ActivityThread(  655):    at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1043)
E/ActivityThread(  655):    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1030)
E/ActivityThread(  655):    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1024)
E/ActivityThread(  655):    at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:341)
E/ActivityThread(  655):    at com.android.internal.content.PackageMonitor.register(PackageMonitor.java:65)
E/ActivityThread(  655):    at com.android.internal.app.ResolverActivity.onCreate(ResolverActivity.java:99)
E/ActivityThread(  655):    at com.android.internal.app.ChooserActivity.onCreate(ChooserActivity.java:53)
E/ActivityThread(  655):    at android.app.Activity.performCreate(Activity.java:4465)
E/ActivityThread(  655):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
E/ActivityThread(  655):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
E/ActivityThread(  655):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
E/ActivityThread(  655):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
E/ActivityThread(  655):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
E/ActivityThread(  655):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/ActivityThread(  655):    at android.os.Looper.loop(Looper.java:137)
E/ActivityThread(  655):    at android.app.ActivityThread.main(ActivityThread.java:4424)
E/ActivityThread(  655):    at java.lang.reflect.Method.invokeNative(Native Method)
E/ActivityThread(  655):    at java.lang.reflect.Method.invoke(Method.java:511)
E/ActivityThread(  655):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/ActivityThread(  655):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/ActivityThread(  655):    at dalvik.system.NativeStart.main(Native Method)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
227 views
Welcome To Ask or Share your Answers For Others

1 Answer

I know this is older, but I've had the same issue and think I stumbled across the answer on accident, though it's strange.

Within the emulator, if you do something to cause an application picker such as a share intent or to choose a gallery app it appears to only have an Exception if there is only one application and automatically loads the application without you choosing one.

For example, you want to pick an image. If you run your routine to select an image you will most likely have a few choices appear in a chooser dialog on your phone. However on the emulator, you rarely have anything other than just the default Gallery application.

When it's only one application and it loads, you get an Exception.

If you have multiple applications to choose from, you'll get no Exception.

The same thing happens if you want to share a text file. On the emulator the text file will automatically load up a Messaging application directly and you'll get an Exception.

enter image description here

If you setup the Email application, it'll show two applications in a chooser. You'll have no Exception.

enter image description here

I believe you can safely ignore this since it appears to be an internal error message.

You can try to reproduce this by installing a second gallery application to see it not creating an error message.

I just noticed this also describes the same suggestion https://stackoverflow.com/a/10290486/935779

It has a more complicated work around if you really want to avoid this Exception.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...