Including .so (armeabi) files

Hello,

I’ve been trying to wrap the Epson EPOS Android SDK (as foreign code).

But i’m hitting a wall brick.

The Epson Android SDK requires 4 files

  • 2 Jar files
  • 2 so files (armeabi, not -v7a)

I’ve followed numerous guides and attempted everything i could find (including https://www.fusetools.com/community/forums/howto_discussions/how_to_include_so_and_jar_files_to_project?page=1 ) but whenever the app is launching, it can never find the bundled so files (which arent bundled in the jar, as far as i can tell):

System.err: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/fr.digifood.fratelsons.pos-1/base.apk"],nativeLibraryDirectories=[/data/app/fr.digifood.fratelsons.pos-1/lib/arm, /system/fake-libs, /data/app/fr.digifood.fratelsons.pos-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libeposprint.so"

My libs files are copied using an uxl file:

<Extensions Backend="CPlusPlus" Condition="Android">
    <CopyFile Name="@('libs/ePOS-Print.jar':Path)" TargetName="@(Java.LibsDirectory)/ePOS-Print.jar" />
    <CopyFile Name="@('libs/ePOSEasySelect.jar':Path)" TargetName="@(Java.LibsDirectory)/ePOSEasySelect.jar" />
    <CopyFile Name="@('libs/armeabi/libeposeasyselect.so':Path)" TargetName="@(Java.LibsDirectory)/armeabi/libeposeasyselect.so" />
    <CopyFile Name="@('libs/armeabi/libeposprint.so':Path)" TargetName="@(Java.LibsDirectory)/armeabi/libeposprint.so" />
    <CopyFile Name="@('xml/device_filter.xml':Path)" TargetName="app/src/main/res/xml/device_filter.xml" />
    <ProcessFile Name="AndroidManifest.xml" TargetName="app/src/main/AndroidManifest.xml" />
</Extensions>

As a side note, I have to manually copy my libs/ files to build\Android\Debug\app\libs or it wont even build.

What am I doing wrong?

Thanks in advance for any help you may provide.

Hi! sorry for the slow reply, I’ve been a bit swamped recently, let’s dig into this.
The first thing that stands out is the way you are replacing the AndroidManifest file seems very likely to fail. Would you be able to send us your project? This would help me be sure I’m working from the same place you are and am fixing the bug you are seeing.

You can send us the project here https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK

Hello,

I didnt forget about this. Just bad timing, holiday-wise. I shall get back to you ASAP !

Thanks !