Osmdroid 6.0.1 with Mapsforge: invalid resource

341 Views Asked by At

We were using osmdroid in our Android app together with Mapsforge for offline maps for some time now. This week we decided to update to version 6.0.1. Since then I receive the following errors when I try to display a map which is using osmdroid:

E/XmlUtils: invalid resource: symbols/transport/helicopter_pad.svg
E/XmlUtils: invalid resource: symbols/transport/airport.svg
E/XmlUtils: invalid resource: symbols/poi/cave.svg
            invalid resource: symbols/volcano.svg
E/XmlUtils: invalid resource: symbols/peak1.svg
            invalid resource: symbols/poi/mountain_pass.svg
            invalid resource: symbols/poi/mountain_pass.svg
E/XmlUtils: invalid resource: symbols/health/hospital.svg
            invalid resource: symbols/health/pharmacy.svg
            invalid resource: symbols/health/doctors.svg
E/XmlUtils: invalid resource: symbols/poi/embassy2.svg
            invalid resource: symbols/accommodation/shelter2.svg
            invalid resource: symbols/accommodation/alpinehut.svg
E/XmlUtils: invalid resource: symbols/accommodation/camping.svg
[... more similar errors ]

The map is still displayed but I think the symbols above are missing and no longer shown.

What we did in detail

we updated our libraries from

implementation 'org.osmdroid:osmdroid-android:5.6.5'
implementation 'org.osmdroid:osmdroid-mapsforge:5.6.5'
implementation 'org.mapsforge:mapsforge-map-android:0.6.1'
implementation 'org.mapsforge:mapsforge-map:0.6.1'

to:

implementation 'org.osmdroid:osmdroid-android:6.0.1'
implementation 'org.osmdroid:osmdroid-mapsforge:6.0.1'
implementation 'org.mapsforge:mapsforge-map-android:0.8.0'
implementation 'org.mapsforge:mapsforge-map:0.8.0'

I also tested with osmdroid 6.0.1 and the original Mapsforge libraries 0.6.1, with the same result. Unfortunately I am not the developer which originally integrated the libraries to our Android project. Therefore I'm not sure if I need to add these resources manually somehow? Maybe someone else encountered this problem too?

Not sure if this information is of any help, but I was testing the app on Android 6 and 8.

1

There are 1 best solutions below

0
k3b On

When updgrading

  • from org.osmdroid:osmdroid-android:6.0.1 with org.mapsforge:mapsforge-map:0.6.1
  • to org.osmdroid:osmdroid-android:6.1.0 with org.mapsforge:mapsforge-map:0.11.0

i had to add to make it work-

  • 'org.mapsforge:mapsforge-themes:0.11.0'

i am now using

implementation 'org.osmdroid:osmdroid-android:6.1.0'
implementation ('org.osmdroid:osmdroid-mapsforge:6.1.0')
implementation 'org.mapsforge:mapsforge-map-android:0.11.0'
implementation 'org.mapsforge:mapsforge-map:0.11.0'
implementation 'org.mapsforge:mapsforge-themes:0.11.0'

Maybe the missing .svg files have moved to a different package?