Android: UnsatisfiedLinkError: "libc++_shared.so"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Android: UnsatisfiedLinkError: "libc++_shared.so"

Stefan Persson
Hi and thanks for this amazing framework.

I've migrated my Android app from GStreamer 1.14.4 to 1.16.0, and with that
moved from NDK 17c to 18b, the version mentioned in the release notes.

The app still builds fine, but when I try to start the GStreamer activity
and call System.loadLibrary("gstreamer_android"), the app crashes with that
call.

The error message is:

9178-9178/org.freedesktop.gstreamer.play E/AndroidRuntime: FATAL EXCEPTION:
main
    Process: org.freedesktop.gstreamer.play, PID: 9178
    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:1657)
        at org.freedesktop.gstreamer.Player.init(Player.java:31)

The above message is from the GStreamer example app I downloaded from
https://cgit.freedesktop.org/gstreamer/gst-examples/tree/playback/player/android
to see if I had missed any change in the makefiles, but as you can see the
crash can be reproduced also with that example.

I'm running the apps on an LG G6 with Android 8.0 and building everything on
Ubuntu 18.04 with Android Studio, gradle and the default Android.mk and
Application.mk.

What have I missed?

Best Regards
Stefan



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Android: UnsatisfiedLinkError: "libc++_shared.so"

Matthew Waters
It's now a requirement that the application pulls in c++_shared
explicitly through the application's ndk-build .mk files.

See
https://gitlab.freedesktop.org/gstreamer/gst-docs/commit/5441a572d99375fb1a74d84dd3d619a8518d484f
for more details on the specifics.

Cheers
-Matt

On 11/5/19 5:50 am, Stefan Persson wrote:

> Hi and thanks for this amazing framework.
>
> I've migrated my Android app from GStreamer 1.14.4 to 1.16.0, and with that
> moved from NDK 17c to 18b, the version mentioned in the release notes.
>
> The app still builds fine, but when I try to start the GStreamer activity
> and call System.loadLibrary("gstreamer_android"), the app crashes with that
> call.
>
> The error message is:
>
> 9178-9178/org.freedesktop.gstreamer.play E/AndroidRuntime: FATAL EXCEPTION:
> main
>     Process: org.freedesktop.gstreamer.play, PID: 9178
>     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:1657)
>         at org.freedesktop.gstreamer.Player.init(Player.java:31)
>
> The above message is from the GStreamer example app I downloaded from
> https://cgit.freedesktop.org/gstreamer/gst-examples/tree/playback/player/android
> to see if I had missed any change in the makefiles, but as you can see the
> crash can be reproduced also with that example.
>
> I'm running the apps on an LG G6 with Android 8.0 and building everything on
> Ubuntu 18.04 with Android Studio, gradle and the default Android.mk and
> Application.mk.
>
> What have I missed?
>
> Best Regards
> Stefan
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Android: UnsatisfiedLinkError: "libc++_shared.so"

Stefan Persson
Thanks for the help!

I had to downgrade Gradle from 5.1.1 to 4.4 for the changes in
Application.mk to take effect. The commands clean, rebuild or refresh linked
c++ project wasn't enough. I could then go back to 5.1.1 and building still
worked fine.

Cheers!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel