Skip to content

Troubleshooting

This section will help you solve potential issues you may face will integrating BEAR SDK.

UnsatisfiedLinkError

Crash may occur at application start with java.lang.UnsatisfiedLinkError error:

couldn't find "lib[name].so"

The BEAR SDK needs to load several libraries when initializing. The message indicates the application could not load a library used in BEAR SDK. To solve this you can do the following:

  • add in your project's build.gradle file:

    android {
      …
      splits {
        abi {
          enable true
          reset()
          include "armeabi-v7a", "arm64-v8a"
          universalApk false
        }
      }
    }
    
    Check how to configure apk splits for more details.

  • if you are using BEAR SDK version older than 2.0.0, also add in your gradle.properties file:

    android.useDeprecatedNdk=true;
    

Proguard

If you compile your application with proguard enabled you may have a java.lang.ClassNotFoundException error at application start:

Didn't find class "com.vuforia.[path to class]"

When using proguard, we recommend adding the following lones to your proguard configuration to avoid crashes:

keep class com.vuforia.** { *; }
keep class com.bear.** { *; }