Android NDK r10:std::string 尚未声明

Android NDK r10: std::string has not been declared

我在使用 android ndk r10 时遇到问题。我得到以下信息:std::string 尚未声明。我看过其他类似的论坛帖子,但没有一个对我有帮助。我的 Application.mk 看起来像这样:

    APP_PLATFORM := android-14
APP_ABI := armeabi-v7a # build for the ARM version of MCPE
APP_CFLAGS := -O2 -std=gnu99 # optimization level 2, use C99 (for decleations in for loops, etc)

APP_CPPFLAGS := -std=c++11
LOCAL_CFLAGS := -std=c++11
APP_STL := stlport_static

请帮帮我!

class std::string 尚未声明,因为它不存在。不幸的是,NDK 中没有std::string。 std::string 的一些端口存在,我记得我找到了一两个,但最后我决定不使用 std::string。为什么?因为我们已经有了Java个字符串和C字符串,Java个字符串来自JNI调用,C字符串来自文件,如果再引入一种字符串类型,转换多于使用

编辑:但请阅读下面的评论。