Код: Выделить всё
Could not create weighting for : خطأ في التهيئة
'profile: 'car
Profile: name=car|vehicle=car|
weighting-custom|turnCosts=false hints ={custom_model=distanceInfluence=70.0| headingPenalty=null|speedStatements=[| priority Statements=[]|areas=[]}
Error: Cannot compile expression: can't load this type of class file
< /code>
и начальный код графства в Java для Android This < /p>
hopper.setGraphHopperLocation(graphFolder.getAbsolutePath());
// ضبط نموذج التوجيه
CustomModel customModel = new CustomModel();
customModel.setDistanceInfluence(70.0);
hopper.setProfiles(Collections.singletonList(
new Profile("car").setVehicle("car").setCustomModel(customModel)
));
Log.d(TAG, "GraphHopper profiles set: " + hopper.getProfiles());
hopper.importOrLoad();
Log.d(TAG, "GraphHopper loaded successfully!");
return true;
} catch (Exception e) {
Log.e(TAG, "Error initializing GraphHopper: " + e.getMessage(), e);
runOnUiThread(() ->
Toast.makeText(MainActivity.this, "خطأ في التهيئة: " + e.getMessage(), Toast.LENGTH_LONG).show()
);
return false;
}
Я стараюсь очень похож на удаление setcustdommodel и отображение на Eror < /p>
Код: Выделить всё
Error initializing GraphHopper: Profiles do
not match:
Graphhopper config: car 125091716
Graph: car 2109948356
Change configuration to match the graph or delete /data/user/0/ com.example.myapplication1fff/files/
graph-cache/
Подробнее здесь: https://stackoverflow.com/questions/795 ... raphhopper
Мобильная версия