SygicFragment crash with UnsatisfiedLinkError

Problem

SygicFragment crashes on java.lang.UnsatisfiedLinkError right after start.

Reason

This happens when your app contains native (*.so) libraries of ABIs that are not included in SygicLib.aar.

For example:
Your app contains native libraries with armeabi, armeabi-v7a and arm64-v8a.
By including SygicLib.aar, you included Sygic native libraries to your APK. However, not all architectures were included (e.g. arm64-v8a was not included).
If you start your APK on 64-bit android OS, system will automatically use arm64-v8a libraries. However, Sygic libraries are not present and app will crash.

To check if this is your problem, unzip your built APK and open lib folder. If it contains any architecture that is not supported by SygicLib.aar, your app may crash.

See also ABIs supported by SygicLib

Solution

Remove all architectures that are not supported by SygicLib.aar from your APK.

There are two alternatives for fixing:

Alternative 1

Exclude all problematic libs in build.gradle:

android { 
    packagingOptions {
        exclude 'lib/arm64-v8a/libSomeLibYouDontWant.so'
        exclude 'lib/arm64-v8a/libAnotherLibYouDontWant.so'
    }
}

Alternative 2

Set ABI filter in build.gradle to target only ABIs supported by SygicLib:

android{
    defaultConfig{
        ndk{
            abiFilters "armeabi", "x86"
        }
    }
}