transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
650 stars 241 forks source link

Error on couldn't find "libtslocationmanager.so #1372

Open lathamios opened 3 weeks ago

lathamios commented 3 weeks ago

Your Environment

I am getting reports of te following error in Firebase on the release version of my app:

         Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library "libtslocationmanager.so" not found
       at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
       at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
       at java.lang.System.loadLibrary(System.java:1664)
       at com.transistorsoft.locationmanager.settings.Settings.<clinit>(Settings.java:2)
       at com.transistorsoft.locationmanager.settings.Settings.load(Settings.java)
       at com.transistorsoft.locationmanager.adapter.TSConfig.<init>(TSConfig.java:65)
       at com.transistorsoft.locationmanager.adapter.TSConfig.a(TSConfig.java:2)
       at com.transistorsoft.locationmanager.adapter.TSConfig.getInstance(TSConfig.java:14)
       at com.transistorsoft.locationmanager.BootReceiver.b(BootReceiver.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

This is what my config looks like in my build.gradle file:

           defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.petbnb.app"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
        ndk { abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64', 'x86'}

    }
    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            shrinkResources false
            proguardFiles "${background_geolocation.projectDir}/proguard-rules.pro"
            ndk {
                abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
            }
        }
    }

Could it be to do with the slightly different abiFilters (in the default config vs BuildTypes ->release)?

christocracy commented 3 weeks ago

Device manufacturer / model: Nexus 5X

From my experience, Nexus 5X is a virtual device that Play Store uses to run your app for testing, so this might require x86 in your release abiFilters.

lathamios commented 3 weeks ago

Thanks for your quick response!