Use 32-bit jni libraries on 64-bit android

后端 未结 7 1877
清酒与你
清酒与你 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:23

    the point is to convert the run environment to 32 bit

    1. add the follow content in build.gradle

      defaultConfig: { ... ndk { abiFilters "armeabi", "armeabi-v7a", "x86", "mips" } }

    2. add android.useDeprecatedNdk=true into gradle.properties

    3. add new folder named armeabi under the libs, then copy a 32bit .so file into the new folder

提交回复
热议问题