Strange exception to new google v2 maps

I recently came up with the following exception from one of the users using my application, has anyone received such an exception?

Edit: This is a Confirmed Error .

Here is the stack:

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x10000000 (has extras) } in maps.z.bz@407c91c8 at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:722) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3701) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalArgumentException: Receiver not registered: maps.z.bz@407c91c8 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:610) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:822) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:331) at maps.z.bz.onReceive(Unknown Source) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:709) ... 9 more java.lang.IllegalArgumentException: Receiver not registered: maps.z.bz@407c91c8 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:610) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:822) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:331) at maps.z.bz.onReceive(Unknown Source) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:709) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3701) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) at dalvik.system.NativeStart.main(Native Method) 
+2
source share
1 answer

Please confirm that you edited the manifest file as follows:

Insert element to include the API key as a child

 <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="--- your API Key here ---"/> 

Remember to replace the value with your own API key.

Please note that you need to use the debug API key (see "Generate the debug API key for the Google API Android API v2") during testing. And then replace the release API key (see "Creating and Obtaining the Google Key API for the Google API Android API v2") in your APK release. Add to and from MAPS_RECEIVE.

 <permission android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE" android:protectionLevel="signature"></permission> <uses-permission android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE"/> 

where com.example.androidmapsv2 is my package, replace it with your own package name.

Add Usage Permission:

 <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 

and optionally:

 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 

Indicate the function of using OpenGL ES 2:

 <uses-feature android:glEsVersion="0x00020000" android:required="true"/> 

EDIT: Do you use any receiver in your application? If yes, then check:

Then the cause of the problem could be here:

 unregisterReceiver(yourReciever); 

If the recipient has already been unregistered or has not been registered, then calling unregisterReceiver raises an IllegalArgumentException. Confirm and tell me

+1
source

All Articles