I'm trying to fix an issue where the app crashes when the map data is installed on the SD card.
when using the default internal storage it all works fine.
Also its working fine on some android 10 users and some users crash.
crash data:
java.lang.RuntimeException: Cannot create map: Failed to read configuration file: /storage/1112-0C10/Android/data/com.myrouteapp.navigation/files/here-cache/155d1c77c33151770c37499776d9c42f/mwconfig_client at com.nokia.maps.MapImpl.<init>(MapImpl.java:3356) at com.here.android.mpa.mapping.Map.<init>(Map.java:2) at com.nokia.maps.a2.a(MapFragmentImpl.java:78) at com.nokia.maps.a2.a(MapFragmentImpl.java:121) at com.nokia.maps.a2.a(MapFragmentImpl.java:1) at com.nokia.maps.a2$a.onEngineInitializationCompleted(MapFragmentImpl.java:3) at com.nokia.maps.MapsEngine$j.run(MapsEngine.java:2) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
code preview:
File[] dirs = context.getExternalFilesDirs(null); if (dirs.length> 1) { File sdLocation = new File(dirs[1], "here-cache"); com.here.android.mpa.common.MapSettings.setDiskCacheRootPath(sdLocation.getAbsolutePath()); } else { com.here.android.mpa.common.MapSettings.setDiskCacheRootPath(storageDir); }
Hello,
I'm trying to fix an issue where the app crashes when the map data is installed on the SD card. when using the default internal storage it all works fine.
Also its working fine on some android 10 users and some users crash.
crash data:
java.lang.RuntimeException: Cannot create map: Failed to read configuration file: /storage/1112-0C10/Android/data/com.myrouteapp.navigation/files/here-cache/155d1c77c33151770c37499776d9c42f/mwconfig_client at com.nokia.maps.MapImpl.<init>(MapImpl.java:3356) at com.here.android.mpa.mapping.Map.<init>(Map.java:2) at com.nokia.maps.a2.a(MapFragmentImpl.java:78) at com.nokia.maps.a2.a(MapFragmentImpl.java:121) at com.nokia.maps.a2.a(MapFragmentImpl.java:1) at com.nokia.maps.a2$a.onEngineInitializationCompleted(MapFragmentImpl.java:3) at com.nokia.maps.MapsEngine$j.run(MapsEngine.java:2) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
code preview:
File[] dirs = context.getExternalFilesDirs(null); if (dirs.length> 1) { File sdLocation = new File(dirs[1], "here-cache"); com.here.android.mpa.common.MapSettings.setDiskCacheRootPath(sdLocation.getAbsolutePath()); } else { com.here.android.mpa.common.MapSettings.setDiskCacheRootPath(storageDir); }
Any help would be greatly appreciated.