I'm getting the error
Android NDK: ERROR:src/main/jni/Android.mk:Cortex: The LOCAL_SRC_FILES
for a prebuilt library should only contain one item
/Users/peterchappy/Library/Android/ndk/build/core/prebuilt-library.mk:28:
*** missing separator. Stop.
when I run ndk-build. I'm not sure what the problem is. Any help would be greatly appreciated.
Android.mk
LOCAL_PATH := $(call my-dir)
# static library info
LOCAL_MODULE := Cortex
LOCAL_MODULE_FILENAME := CortexLibrary-i386
LOCAL_EXPORT_C_INCLUDES := ../prebuild/include
include $(PREBUILT_STATIC_LIBRARY)
# wrapper info
include $(CLEAR_VARS)
LOCAL_C_INCLUDES += ../prebuild/include
LOCAL_MODULE := wrapper
LOCAL_SRC_FILES := wrapper.c
LOCAL_STATIC_LIBRARIES := libYourLibrary
include $(BUILD_SHARED_LIBRARY)
Application.mk
APP_STL := gnustl_static
APP_PLATFORM := android-8
APP_BUILD_SCRIPT := Android.mk
It looks like you are missing:
LOCAL_SRC_FILES := yourmodule.a
before:
include $(PREBUILT_STATIC_LIBRARY)
inside prebuilt-library.mk you can see:
# Check that LOCAL_SRC_FILES contains only paths to shared libraries
ifneq ($(words $(LOCAL_SRC_FILES)),1)
$(call __ndk_info,ERROR:$(LOCAL_MAKEFILE):$(LOCAL_MODULE): The LOCAL_SRC_FILES for a prebuilt static library should only contain one item))
$(call __ndk_error,Aborting)
endif
or maybe it is set to some invalid value and you rather should add:
include $(CLEAR_VARS)
right after:
# static library info
I add ndk abiFilters at my build.gradle,and it works.
defaultConfig {
applicationId "com.coffee.test"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0
ndk {
abiFilters "armeabi-v7a"
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.