Metaio Android SDK: crash on Samsung Galaxy S6

621 views Asked by At

I have an application that uses the Metaio SDK to show some Augmented Reality stuff.

I have an issue where the app crashes when running it on Samsung Galaxy S6. Unfortunately I don't have any logcat logs for the issue.

I found this link http://helpdesk.metaio.com/questions/46459/android-sdk-arm64-support/46479.html talking about a similar issue, it relates to the 64-bit CPU on the Samsung S6, but I'm not sure if this is the cause of my issue.

Has anyboday seen something similar to this before?

2

There are 2 answers

0
Mina Wissa On BEST ANSWER

I know this is an old question and Metaio is not there anymore, but the solution was to upgrade the Metaio SDK to the latest availble version back then.

1
ph0b On

it has good chances to be related to your issue.

When you install an APK on Android, the system will look for native libraries directories (armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, mips64, mips) inside the lib folder of the APK, in the order determined by Build.SUPPORTED_ABIS.

If your app happen to have an arm64-v8a directory with other libs, the 32-bit metaio libs will not be installed as the libs aren't mixed. That means you have to provide the full set of your libraries for each architecture.

So, to solve your issue, you can remove your 64-bit libs from your build, or set abiFilters to package only 32-bit architectures:

android {
    ....
    defaultConfig {
        ....
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
        }
    }
}

If you get an error related to the use of the deprecated NDK support, add android.useDeprecatedNdk=true to a file named gradle.properties at the root of your project. Don't feel bad about using a deprecated integration, as using abiFilters is still the cleanest way atm to filter out 64-bit libs from an APK.