rive-app / rive-android

A runtime for interactive animations on Android
https://rive.app
MIT License
361 stars 31 forks source link

Android build crash #302

Open hieuptit93 opened 1 year ago

hieuptit93 commented 1 year ago

Description

java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/data/com.stepup.tofuapp.dev/app_lib/librive-android.so"... at android.app.ActivityThread.installProvider(ActivityThread.java:8328) at android.app.ActivityThread.installContentProviders(ActivityThread.java:7828) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7577) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Caused by: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/data/com.stepup.tofuapp.dev/app_lib/librive-android.so"... at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:187) at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238) at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206) at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45) at android.content.ContentProvider.attachInfo(ContentProvider.java:2522) at android.content.ContentProvider.attachInfo(ContentProvider.java:2492) at android.app.ActivityThread.installProvider(ActivityThread.java:8323) at android.app.ActivityThread.installContentProviders(ActivityThread.java:7828)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7577)  at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loopOnce(Looper.java:226)  at android.os.Looper.loop(Looper.java:313)  at android.app.ActivityThread.main(ActivityThread.java:8757)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) 

Device & Versions

react-native: 0..70.13 rive-react-native: 6.0.4

Added this section to app.gradle android section:

packagingOptions { pickFirst "lib/x86/libc++_shared.so" pickFirst "lib/x86_64/libc++_shared.so" pickFirst "lib/armeabi-v7a/libc++_shared.so" pickFirst "lib/arm64-v8a/libc++_shared.so" }

umberto-sonnino commented 1 year ago

This is a rive-react-native issues, I see you opened a ticket there too. Could you share your code and rive file? Without an example that reproduces this issue it's hard to understand what's going on.

hieuptit93 commented 5 months ago

I haven't run any Rive files yet, I just ran the app and it crashed immediately.

m1ga commented 4 months ago

Same issue here with a Titanium SDK module build with the rive-android module

ERROR] TiExceptionHandler: (main) [197,419] java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/data/ti.animation.app/app_lib/librive-android.so"...
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler:     java.lang.Runtime.load0(Runtime.java:933)
[ERROR] TiExceptionHandler:     java.lang.System.load(System.java:1625)
[ERROR] TiExceptionHandler:     com.getkeepsafe.relinker.SystemLibraryLoader.loadPath(SystemLibraryLoader.java:31)
[ERROR] TiExceptionHandler:     com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:206)
[ERROR] TiExceptionHandler:     com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
[ERROR] TiExceptionHandler:     com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
[ERROR] TiExceptionHandler:     com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:51)
[ERROR] TiExceptionHandler:     app.rive.runtime.kotlin.core.Rive.init(Rive.kt:43)
[ERROR] TiExceptionHandler:     app.rive.runtime.kotlin.core.Rive.init$default(Rive.kt:38)
[ERROR] TiExceptionHandler:     app.rive.runtime.kotlin.RiveInitializer.create(RiveInitializer.kt:34)
[ERROR] TiExceptionHandler:     app.rive.runtime.kotlin.RiveInitializer.create(RiveInitializer.kt:32)

implementation 'app.rive:rive-android:5.1.5' works but any module higher then that produces that error when I start the app.