Pure NativeActivity: Unable to start activity; Unable to load native library

333 Views Asked by At

Once the APK launches, I get this error:

E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.engine001.test/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to load native library: /data/app/com.myapp.test-2/lib/arm/libLauncher.so

Even the most basic NDK app seems to have this issue, even without linking to other .so. Using latest Tegra/NDK/etc... tools.

Entire system worked fine until I upgraded systems and updated tools.

EDIT: I have tried to install the previous version of the tools I had working (ndk r12b). I have also tried literally copying my old NVPACK and setting things back up to no avail.

I am not sure what to include. This is a very large project currently in use.

I cannot include actual Java code as I modify the APK after and this cannot be done if a DEX file is produced, which is what Java entails. So to be clear, using a pure NativeActivity.

1

There are 1 best solutions below

1
shizhen On

Unable to load native library: /data/app/com.myapp.test-2/lib/arm/libLauncher.so

Newer NDK does not support this path anymore. You need to ensure that your ABIs are x86, x86_64, armeabi-v7a, arm64-v8a. i.e. paths should be something like below:

/data/app/com.myapp.test-2/lib/arm64-v8a/libLauncher.so