Compilation 通过ndk build生成android.mk时出错

Compilation 通过ndk build生成android.mk时出错,compilation,android-ndk,Compilation,Android Ndk,我正在使用ndk build在我的Android项目中构建一些本机代码 这是我的android.mk内容: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := julius_arm LOCAL_SRC_FILES := interface.c LOCAL_C_INCLUDES += $(LOCAL_PATH)/include LOCAL_STATIC_LIBRARIES := julius sent LOC

我正在使用ndk build在我的Android项目中构建一些本机代码

这是我的android.mk内容:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE    := julius_arm
LOCAL_SRC_FILES := interface.c
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := julius sent
LOCAL_CFLAGS    := -DANDROID_DEBUG
LOCAL_LDLIBS    := -lc -lz -lgcc -llog -L$(LOCAL_PATH)/lib -llibjulius-llibsent

include $(BUILD_SHARED_LIBRARY)
android.mk文件与jni目录中的include文件夹和lib文件夹位于同一目录中

include文件夹包含juliussent文件夹。 lib文件夹包含libjulius.a和libsent.a

当我尝试使用ndk build构建它时。我得到以下错误:

00af158\Desktop\microsoft\JuliusForAndroid\app\src\main\jni\lib>ndk-build
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
:     current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
:     current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
:     current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
:     current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
:     current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
:     current module
: WARNING:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm: non-system libraries in linker flags: -lgcc -llibjulius -llibsent
:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
:     current module
 Compile        : julius_arm <= interface.c
 SharedLibrary  : libjulius_arm.so
ndk-r13b/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -llibjulius
ndk-r13b/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -llibsent
: error: linker command failed with exit code 1 (use -v to see invocation)
C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/obj/local/arm64-v8a/libjulius_arm.so] Error 1
00af158\Desktop\microsoft\JuliusForAndroid\app\src\main\jni\lib>ndk build
:警告:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm:链接器标志中的非系统库:-lgcc-llibjulius-llibsent
:这可能会导致不正确的生成。尝试使用本地\u静态\u库
:或本地共享库,以列出
:当前模块
:警告:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm:链接器标志中的非系统库:-lgcc-llibjulius-llibsent
:这可能会导致不正确的生成。尝试使用本地\u静态\u库
:或本地共享库,以列出
:当前模块
:警告:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm:链接器标志中的非系统库:-lgcc-llibjulius-llibsent
:这可能会导致不正确的生成。尝试使用本地\u静态\u库
:或本地共享库,以列出
:当前模块
:警告:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm:链接器标志中的非系统库:-lgcc-llibjulius-llibsent
:这可能会导致不正确的生成。尝试使用本地\u静态\u库
:或本地共享库,以列出
:当前模块
:警告:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm:链接器标志中的非系统库:-lgcc-llibjulius-llibsent
:这可能会导致不正确的生成。尝试使用本地\u静态\u库
:或本地共享库,以列出
:当前模块
:警告:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm:链接器标志中的非系统库:-lgcc-llibjulius-llibsent
:这可能会导致不正确的生成。尝试使用本地\u静态\u库
:或本地共享库,以列出
:当前模块
:警告:C:/Users/ve00af158/Desktop/microsoft/JuliusForAndroid/app/src/main/jni/Android.mk:julius_arm:链接器标志中的非系统库:-lgcc-llibjulius-llibsent
:这可能会导致不正确的生成。尝试使用本地\u静态\u库
:或本地共享库,以列出
:当前模块

编译:julius_arm听到警告了吗?不要将您的库添加到
本地\u LDLIBS
。它们只需添加
本地\u共享\u库
本地\u静态\u库
。是否收听警告?不要将您的库添加到
本地\u LDLIBS
。它们只需添加
本地共享库
本地静态库