1

I have a C library that I am hoping to wrap in JNI and call from my android project. The .so file is the following architecture: i386:x86-64. Whenever I add it to my project inside the src/main/jniLibs/arm64-v8a|armeabi-v7a|x86 folders, I get an error saying the .so file is 64-bit instead of 32-bit. I have tried cross-referencing this issue and noticed that people usually get the opposite issue, where the .so was 32-bit instead of 64-bit. I've tried combing through Android documentation to see where I messed up but can't seem to find a solution.

user207421
  • 305,947
  • 44
  • 307
  • 483
Daniel Rust
  • 539
  • 1
  • 4
  • 15

1 Answers1

4

A 64-bit library should not be in src/main/jniLibs/armeabi-v7a folder. If your device supports arm64-v8a ABI, the app will be using the 64-bit library. If the device is not compatible, you cannot use this library.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307