在Android ndk中使用vector时出现致命错误

在Android ndk中使用vector时出现致命错误,android,c++,android-ndk,Android,C++,Android Ndk,我的项目在Android中使用本机代码。我试图在我的一个文件中使用std::vector,但得到的错误是“致命错误:vector:没有这样的文件或目录”。我跟踪了所有的讨论。我的Application.mk是 APP_STL := stlport_shared LIB_TEST_DIR := $(call my-dir) include $(CLEAR_VARS) LOCAL_PATH := $(LIB_TEST_DIR) LOCAL_MODULE := usb_camera_simple

我的项目在Android中使用本机代码。我试图在我的一个文件中使用std::vector,但得到的错误是“致命错误:vector:没有这样的文件或目录”。我跟踪了所有的讨论。我的Application.mk是

APP_STL := stlport_shared
LIB_TEST_DIR := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_PATH := $(LIB_TEST_DIR)

LOCAL_MODULE := usb_camera_simple_native

LOCAL_MODULE_FILENAME := libusb_camera_simple_native

LOCAL_CPP_EXTENSION := .cpp .cc .cxx

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include

LOCAL_CFLAGS := -DHAVE_CONFIG_H

LOCAL_SRC_FILES := com_astralink_orcas_api_UsbCamera.c

include $(BUILD_SHARED_LIBRARY)
我的路径设置如附件所示。 包含
向量头的我的文件如下所示

#ifndef _ACCESSORIES_H_
#define _ACCESSORIES_H_
#include <vector>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct{
     int col;
     int row;
     int width;
     int height;
}loc_rects;
typedef struct{

     int numofppl;
     int camera_idx;
     unsigned char *frame;//image buffer
     std::vector<loc_rects> locs;
}container;


#ifdef __cplusplus
}
#endif
#endif
\ifndef\u附件_
#定义附件_
#包括
#ifdef_uucplusplus
外部“C”{
#恩迪夫
类型定义结构{
int col;
int行;
整数宽度;
内部高度;
}地址;
类型定义结构{
国际货币基金组织;
国际摄像机协会;
无符号字符*帧;//图像缓冲区
std::载体LOC;
}容器;
#ifdef_uucplusplus
}
#恩迪夫
#恩迪夫

您指定了应用程序平台吗?它应该在哪里?在Application.mk?是的,尝试APP_PLATFORM:=android-14从您发布的.mk文件内容中,只有APP_STL应该在Application.mk内,其余(本地_SRC_文件…)应该在android.mk内