kmlosmbonuspack

OSMBonusPack KMLDocument and Android 4.x


I'm using osmdroid 5.6.5 + osmbonuspack 6.4 to process a KML file and show the objects over a map. All this works fine on Android 5.x+ but fails on Android 4.x:

The code KmlDocument kmlDocument = new KmlDocument(); returns the error "java.lang.VerifyError: "

Anyone can help me to solve this?

Best regards,

NR.


Solution

  • Source of the problem: gson dependency missed on build.gradle.

    Solution: add the following line on build.gradle:

    enter code hereimplementation 'com.google.code.gson:gson:2.8.0'