(Android) How to move dependency to apk
-
I want to move 2 libraries of a dependency that my application is using to the lib/ folder of the apk.
More detailed: When building a dependency from source, I get 4 files:
- libmupdf.so
- libmupdf.so.24.0
- libmupdfcpp.so
- libmupdfcpp.so.24.0
Where
libmupdf.so
is a link tolibmupdf.so.24.0
(the same goes forlibmupdfcpp.so
andlibmupdfcpp.so.24.0
). Qt automatically moveslibmupdf.so
andlibmupdfcpp.so
to the apk, but when starting my application, I get the errorjava.lang.UnsatisfiedLinkError: dlopen failed: library "libmupdfcpp.so.24.0" not found
because the sonames (libmupdfcpp.so.24.0
andlibmupdf.so.24.0
) aren't moved to the lib/ folder of the apk, thus the links are broken.So I am trying to find a solution for moving those libraries to the apk's lib/ folder.
I have triedQT_ANDROID_EXTRA_LIBS
, but there seems to be a rule that says that the libraries need to start withlib
and end with.so
, thus it fails since my libraries end with24.0
.Does someone have an idea how I could fix that?
-
This post is deleted!
-
This post is deleted!
-
This post is deleted!
@SilviaCummings are these libs built for Android? if not, you can not move them into apk. I guess you have to find android build of the libs and pack them in your build file. Or you build them for Android from their sources.
-
This post is deleted!