Android问题加载.so文件

时间:2016-02-25 10:27:50

标签: android android-ndk java-native-interface linker-errors

我正在开发一个在4.2.2版本上运行的Android POS设备我需要利用serialPort api与我配置了gradle的打印机进行通信,以创建用生成的.apk文件压缩的​​libs文件夹

02-25 10:18:59.956 29180-29180/com.amedora.slrtcpos E/linker: load_library(linker.cpp:771): too small to be an ELF executable: /data/app-lib/com.amedora.slrtcpos-1/libserial_port.so
02-25 10:18:59.956 29180-29180/com.amedora.slrtcpos E/dalvikvm: dlopen("/data/app-lib/com.amedora.slrtcpos-1/libserial_port.so") failed: Cannot load library: load_library(linker.cpp:771): too small to be an ELF executable: /data/app-lib/com.amedora.slrtcpos-1/libserial_port.so
02-25 10:18:59.970 29180-29180/com.amedora.slrtcpos E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Cannot load library: load_library(linker.cpp:771): too small to be an ELF executable: /data/app-lib/com.amedora.slrtcpos-1/libserial_port.so

This is the structure of JNI folder

我需要帮助,有人可以告诉我为什么它太小而不能成为ELF可执行文件

1 个答案:

答案 0 :(得分:2)

too small to be an ELF executable: /data/app-lib/com.amedora.slrtcpos-1/libserial_port.so

表示您有一个带有上述路径的零长度文件。