Use 32-bit jni libraries on 64-bit android

后端 未结 7 1892
清酒与你
清酒与你 2020-11-28 23:39

I\'ve tried running an application using a native library on the Nexus 9.

The application exits with an error message:

java.lang.UnsatisfiedLinkError         


        
7条回答
  •  死守一世寂寞
    2020-11-29 00:37

    I encountered the same issue, when I did the update from Android Studio 2.1 to 2.2.3 (with ndk v.13.1), and no tips found in google really helped me (like using abiFilters, exclude 'lib/x86_64/lib….so’, LOCAL_MULTILIB := 32, or TARGET_PREFER_32_BIT := true, …).

    Finally, I was able to make it worked again with the latest AS v2.2.3 (without changing anything in Android.mk or in build.gradle), just by using my previous ndk compiler, i.e. android-ndk-r10e

    I built the library manually with ndk-build for "armeabi-v7a" and "x86" only, and it worked like a charm on Android with arm64.

提交回复
热议问题