While upgrading my Andoid app I used a newer gradle dependency for Graphhopper-core:
implementation group: 'com.graphhopper', name: 'graphhopper-core', version: '7.0'
A few years ago, there was a mobile version. Is it gone?
When starting the Graphhopper part of my app, I get this error:
java.lang.OutOfMemoryError: Failed to allocate a 392 byte allocation with 185320 free bytes and 180KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC. at java.util.Arrays.copyOf(Arrays.java:3766) ... at com.graphhopper.GraphHopper.load(GraphHopper.java:1048)
I had to change the calls to Graphhopper, since there was no Graphhopper for Mobile anymore.
GraphHopper hopper = new GraphHopper();
hopper.setProfiles(new Profile("foot").setVehicle("foot").setWeighting("fastest"));
hopper.setGraphHopperLocation(routingDataFolder);
hopper.importOrLoad();
How can I get this running without memory issues?