Android app crashes after initialization with "SDK engine is null" or getSdkInternal() error in HERE SDK Navigate Edition 4.15.1.0 and later
Symptoms
--------
Customers may experience one or more of the following symptoms:
Application crashes immediately after startup or during HERE SDK initialization.
Error message: "SDK engine is null. Please provide a valid object."
Native crash referencing libheresdk.so.
Stack trace contains:
<br /> here::sdk::core::engine::getSdkInternal(std::__ndk1::shared_ptr const&)<br />
Crash log references:
<br /> libcxxabi/src/cxa_exception.cpp<br />
Navigation, map rendering, search, or routing functionality fails to initialize.
Answer
------
This issue occurs when an application uses the previously deprecated InitProvider mechanism with HERE SDK for Android (Navigate Edition) version 4.15.1.0 or later. The SDK no longer creates a shared SDKNativeEngine instance automatically during application startup. The application must explicitly create and manage the SDKNativeEngine instance before accessing SDK functionality.
Removing the deprecated InitProvider configuration and initializing the SDK according to the current SDK architecture resolves the issue.
Root Cause
----------
Beginning with HERE SDK for Android (Navigate Edition) 4.15.1.0 and later, automatic engine creation through the deprecated InitProvider workflow is no longer the recommended initialization approach.
Applications that continue to rely on the old initialization behavior may attempt to access HERE SDK services before a valid SDKNativeEngine instance exists. As a result, the SDK receives a null engine reference and throws an exception that can terminate the application.
The following deprecated components should no longer be used in normal application deployments:InitProvider
InitProvider.destroyLockingProcess()InitProvider.makeSDKNativeEngine()
InitProvider.getAndroidContext()
Impact
------
Application startup failures
Native crashes during SDK initialization
Map and navigation features unavailable
Routing, search, and positioning components may fail to load
Unstable application behavior when SDK services are accessed before engine creation
Recommended Actions
-------------------
1. Open the application's AndroidManifest.xml.
2. Remove the deprecated InitProvider entry if it is still configured.
3. Ensure the application explicitly creates a valid SDKNativeEngine instance during startup.
4. Initialize HERE SDK components only after successful engine creation.
5. Review and align the implementation with the initialization pattern used in the current HERE SDK example applications.
6. Rebuild and redeploy the application.
Expected Behavior
-----------------
The application explicitly creates a valid SDKNativeEngine.
SDK services initialize successfully after engine creation.
Maps, navigation, routing, and search features operate normally.
Unexpected Behavior
-------------------
The application depends on deprecated automatic initialization behavior.
No valid SDKNativeEngine instance exists when HERE SDK APIs are called.
* The application crashes with "SDK engine is null" errors or native exceptions from libheresdk.so.
Keywords
--------
HERE SDK, Android, Navigate Edition, SDK engine is null, SDKNativeEngine, InitProvider, AndroidManifest.xml, libheresdk.so, getSdkInternal, application crash, initialization failure, deprecated API, native exception, startup crash, HERE SDK 4.15.1.0
Updated 3 days ago