-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I have built this app on android studio on windows 10 PC. Build is successful but when I install and open the app on Mobile with Android 9 arm64-v8a the app throws error as below,
java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1669)
at org.freedesktop.gstreamer.rtsp_example.RTSPExample.(RTSPExample.java:122)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
at android.support.v4.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
at android.app.Instrumentation.newActivity(Instrumentation.java:1216)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6823)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
I have seen at docs https://developer.android.com/ndk/guides/cpp-support to provide libstdc++_shared.so to be provided explicitly,
but I could not find any simple example of doing it
I tried adding in Application.mk as below to try,
APP_STL := c++_shared
and
APP_STL := c++_static
But issue still happens.
I could see there is no libstdc++_shared.so added to generated apk at path
..android_rtsp_example\app\build\outputs\apk\debug\app-debug.apk\lib\arm64-v8a\
Is this due to same reason that libstd+++shared.so is missing in apk if so how to enable Application.mk/Andoid.mk to have it added to apk?
Or Please let know if there is a different approach to address this issue?