The map or layer has been destroyed or recyled

3666
6
02-23-2014 05:51 AM
teamIgal
New Contributor III
Hello,

I have a problem when the app restores after the map activity has been destroyed by the system.
The system calles OnDestroy on it's own, which is fine, but then, when i open the app back, everything restores (the app calles OnCreate again) except for the mapView Object.
When i try to add layers to the mapView i get the following message:

"The map or layer has been destroyed or recyled"

Does anybody had the same problem?
Any clues how to fix this?

Thank,
Team Igal
0 Kudos
6 Replies
teamIgal
New Contributor III
also, i tryed to add the mapView from code,
and in the OnCreate i even set

mMapView = null
mMapView = new MapView(...

and still i get the same error, and i can't see the map.
0 Kudos
JasonKnisley
Occasional Contributor
That's not an error that I've seen before. By chance, are you overriding onDestroy and not calling super.onDestroy() at the end of the method?
0 Kudos
teamIgal
New Contributor III
That's not an error that I've seen before. By chance, are you overriding onDestroy and not calling super.onDestroy() at the end of the method?


I am overriding onDestroy, but i am calling super.onDestroy() in the end of the method.
0 Kudos
JasonKnisley
Occasional Contributor
If you're still wrestling with this issue and want someone else to test it out, feel free to PM me. I can give you my email address and if your able to email your code to me then I can replicate it on one of my devices and see if I can figure out what the problem might be.
0 Kudos
teamIgal
New Contributor III
If you're still wrestling with this issue and want someone else to test it out, feel free to PM me. I can give you my email address and if your able to email your code to me then I can replicate it on one of my devices and see if I can figure out what the problem might be.


Thank you for the help! Unfortunetly i can't send the code.
But i realized that the map is never being initialized after i resume back.
The listener of the status changed is not being called
0 Kudos
KunalMehta
New Contributor II

Did you find a resolution to this? I am facing the same issue with ArcGIS Android SDK 10.2.3.

0 Kudos