I am trying to build an android app but encountered an issue. When I try to use the openssl prefab for example, the openssl.so/libcrypto.so files do not get packed into the APK. This applies even to a brand new blank NDK project with nothing but the prefab. When I try to run the app, I get this
FATAL EXCEPTION: main (Ask Gemini)
Process: com.example.myapplication2, PID: 3723
java.lang.UnsatisfiedLinkError: dlopen failed: library "libcrypto.so" not found: needed by /data/app/~~ZiyE6_J10pUvMSnKs4xW4A==/com.example.myapplication2-z6zIpCtVD-xUDRzIzDQC6A==/base.apk!/lib/x86_64/libmyapplication2.so in namespace clns-6
at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
at java.lang.System.loadLibrary(System.java:1661)
at com.example.myapplication2.MainActivity.<clinit>(MainActivity.java:14)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
at android.app.Instrumentation.newActivity(Instrumentation.java:1378)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3676)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Upon examining the APK in android studio, it is clear those files did not make it in.
If I copy the test project onto another machine running the same OS, it works fine. I have tried reinstalling the SDK, android studio, and java. I’ve tried making new projects and clearing every cache I know of. I’ve tried everything I can think of short of reinstalling windows 11.
Additionally, if I manually build and package the library, that works too. Don’t want to do that for just my machine tho. Want to use the prefab.