我收到以下错误;
E/AndroidRuntime(446): Caused by: java.lang.UnsatisfiedLinkError: Library XYZ not found
但我的项目中有XYZ库。文件夹结构是:
-ProjectFolder
--obj
---local
----armeabi
-----objs
------libXYZ.so
------libstdc++.a
------XYZ
-------folderA
--------fileX.o
--------fileX.o.d
--jni
---Android.mk
---folderA
----fileX.cpp
----fileX.h
Android.mk文件:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
APP_ABI := armeabi armeabi-v7a x86
LOCAL_MODULE := XYZ
LOCAL_SRC_FILES := folderA/fileX.cpp
include $(BUILD_SHARED_LIBRARY)
C ++编译输出:
Compile++ thumb : XYZ <= fileX.cpp
In file included from jni/folderA/fileX.h:1:0,
from jni/folderA/fileX.cpp:1:
/Applications/android-ndk-r8b/platforms/android-5/arch-arm/usr/include/jni.h:592:13: note: the mangling of 'va_list' has changed in GCC 4.4
StaticLibrary : libstdc++.a
SharedLibrary : libXYZ.so
Install : libXYZ.so => libs/armeabi/libXYZ.so
当图书馆位于正确的位置时,我不明白为什么错误说“未找到图书馆XYZ”。