When included latest HEREMap's android SDK HERE_Android_SDK_Premium_v3.10.1_96
.
I am getting following error while building.
com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'lib/armeabi-v7a/libgnustl_shared.so'
Its working fine when HERE_Android_SDK_Starter_v3.10.0_20
sdk is used.
Am trying this in a react-native project by simply including the HERE-SDK.aar file in a new react native app also, the same error is coming.
I could solve the compilation error by deleting libgnustl_shared.so from .aar file. But then the map is not displayed, instead a screen is loaded in blue color.
Any idea why this might be happening?
[Edit] I could see below error when libgnustl_shared.so was deleted :-/.
E/HereMapView: Error initializing map: Unknown error occurred during engine init.
I was able to resolve this issue by updating my app/build.gradle
. Following code was added in the gradle,
packagingOptions {
pickFirst 'lib/x86_64/libgnustl_shared.so'
pickFirst 'lib/x86/libgnustl_shared.so'
pickFirst 'lib/arm64-v8a/libgnustl_shared.so'
pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
}