Error in MapActivity

21 views
Skip to first unread message

علی بهزادیان نژاد

unread,
Dec 27, 2012, 4:31:04 AM12/27/12
to mapsfo...@googlegroups.com
Hi there, 

I get the latest source code and built a sample app with that. The problem is that I got this exception and app does not work:

Caused by: java.lang.ClassCastException: java.lang.Integer
at android.app.ContextImpl$SharedPreferencesImpl.getFloat(ContextImpl.java:2733)
at org.mapsforge.android.maps.MapActivity.restoreMapView(MapActivity.java:76)
... 26 more

Any idea?
Ali

Ludwig

unread,
Dec 27, 2012, 5:26:31 AM12/27/12
to mapsfo...@googlegroups.com
This is issue http://code.google.com/p/mapsforge/issues/detail?id=371

One way to work around it is to uninstall the previous version of the app first. 
A better way is to rename the shared preference for the latitude and longitude that saves the last map position (see the discussion in the issue). 


--
 
 

Thilo Mühlberg

unread,
Dec 27, 2012, 7:05:18 AM12/27/12
to mapsfo...@googlegroups.com
I have just implemented a fix which will be merged into the master
branch as soon i got Ludwig's sign off for it. :-)

See: https://code.google.com/p/mapsforge/issues/detail?id=371#c4

Greetings,
Thilo

On 27/12/12 11:26, Ludwig wrote:
> This is issue http://code.google.com/p/mapsforge/issues/detail?id=371
>
> One way to work around it is to uninstall the previous version of the
> app first.
> A better way is to rename the shared preference for the latitude and
> longitude that saves the last map position (see the discussion in the
> issue).
>
>
> On 27 December 2012 10:31, علی بهزادیان نژاد <ali.be...@gmail.com
> <mailto:ali.be...@gmail.com>> wrote:
>
> Hi there,
>
> I get the latest source code and built a sample app with that. The
> problem is that I got this exception and app does not work:
>
> Caused by: java.lang.ClassCastException: java.lang.Integer
> at
> android.app.ContextImpl$SharedPreferencesImpl.getFloat(ContextImpl.java:2733)
> at
> org.mapsforge.android.maps.MapActivity.restoreMapView(MapActivity.java:76)
> ... 26 more
>
> Any idea?
> Ali
>
> --
>
>
>
>
> --
>
>


signature.asc
Reply all
Reply to author
Forward
0 new messages