Insta360Develop / CameraSDK-Android

Android SDK to control Insta360 cameras
81 stars 9 forks source link

dlopen failed: library "libinsbase.so" not found on ABI x86_64 #81

Open mobile-sergey opened 1 week ago

mobile-sergey commented 1 week ago

We update to 1.6.8 and publish to GooglePlay we get this error:

Screenshot from 2024-09-03 12-36-05

Text of error:

09-02 12:14:05.232 10741 10741 E AndroidRuntime: FATAL EXCEPTION: main
09-02 12:14:05.232 10741 10741 E AndroidRuntime: Process: ru.biganto.biganto360, PID: 10741
09-02 12:14:05.232 10741 10741 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libinsbase.so" not found
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at java.lang.Runtime.loadLibrary0(Runtime.java:998)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at java.lang.System.loadLibrary(System.java:1656)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at com.arashivision.insbase.NativeLibsLoader.load(NativeLibsLoader.java:15)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at com.arashivision.insbase.sys.SysInfo.<clinit>(SysInfo.java:21)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at com.arashivision.insbase.sys.SysInfo.init(Unknown Source:0)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at com.arashivision.insbase.InsBase.init(InsBase.java:19)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at com.arashivision.sdkmedia.InstaMediaSDK.init(Unknown Source:0)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at ru.biganto.biganto360.app.SfmApplication.onCreate(SfmApplication.kt:31)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1223)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6762)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.app.ActivityThread.access$1500(ActivityThread.java:256)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7870)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
09-02 12:14:05.232 10741 10741 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

In ru.biganto.biganto360.app.SfmApplication.onCreate() we use only this:

class SfmApplication : Application() {
    override fun onCreate() {
        super.onCreate()
...
        InstaCameraSDK.init(this)
        InstaMediaSDK.init(this)
        InstaCameraManager.getInstance()
...
    }
}

Libs are added in build.gradle.kts (app):

implementation(libs.insta.camera)
implementation(libs.insta.media)

In libs.version.toml:

[versions]
insta = "1.6.8"
[libraries]
insta-camera = { group = "com.arashivision.sdk", name = "sdkcamera", version.ref = "insta" }
insta-media = { group = "com.arashivision.sdk", name = "sdkmedia", version.ref = "insta" }

in build.gradle.kts (project):

buildscript {
    repositories {
...
        maven {
            url = uri("http://nexus.arashivision.com:9999/repository/maven-public/")
            isAllowInsecureProtocol = true
            credentials {
                username = "deployment"
                password = "test123"
            }
        }
    }
}

allprojects {
    repositories {
...
        maven {
            url = uri("http://nexus.arashivision.com:9999/repository/maven-public/")
            isAllowInsecureProtocol = true
            credentials {
                username = "deployment"
                password = "test123"
            }
        }
    }
}

In proguard-rules.pro:

-keepattributes Signature

-keepattributes Annotation

-keep class com.google.** { *; }
-keep class sun.misc.** { *; }

# Insta 360
-keep class java.**{*;}
-keep class com.arashivision.**{*;}
mobile-sergey commented 1 week ago

Errof fixed when I removed support for "x86_64" and "x86" architectures

Please add to documentation that you support only architecture "arm64-v8a" and "armeabi-v7a"

steelbytes commented 1 day ago

no x86/x64? seriously I don't think I'll waste my time with the sdk.