heremaps / here-sdk-examples

Android, iOS and Flutter example apps for the HERE SDK 4.x (Lite Edition, Explore Edition, Navigate Edition)
https://developer.here.com/products/here-sdk
Apache License 2.0
170 stars 135 forks source link

Initialization of HERE SDK failed: FAILED_TO_CREATE_ANALYTICS_SERVICE #322

Closed Strikelon closed 1 month ago

Strikelon commented 3 months ago

We use android-sdk-navigate/4.12.11.0

And in firebase crashlitics we got some float crashes on this devices:

Xiaomi Redmi Note 13, Android 14

Samsung Galaxy S21 5G, Android 13,

The error is "java.lang.RuntimeException - Initialization of HERE SDK failed: FAILED_TO_CREATE_ANALYTICS_SERVICE"

In this method:

private fun initializeHereSDK() {
    val options = SDKOptions(HERE_ACCESS_KEY_ID, HERE_ACCESS_KEY_SECRET)
    try {
        SDKNativeEngine.makeSharedInstance(context, options)
    } catch (e: InstantiationErrorException) {
        throw RuntimeException("Initialization of HERE SDK failed: " + e.error.name)
    }
}

1) why might this "FAILED_TO_CREATE_ANALYTICS_SERVICE" happen? 2) what is the best way to handle this error? maybe try to initialize it again in a loop with a slight delay?

HERE-SDK-Support-Team commented 1 month ago

Hi @Strikelon,

this issues has been fixed. Can you try 4.19.5. or newer? If the issue persists, please leave a reply or contact us directly via: https://www.here.com/contact?intref=dev_docum

Hope this helps. Thanks.