Method:
1. Create a new application.mk under the JNI directory; Add App_stl: = Stlport_static to the right of the value can also be replaced by the following:
System-Uses the default minimal C + + runtime, which makes the resulting application small and memory-intensive, but some features will not support
Stlport_static-use STLport as a static library, which is highly recommended by the Android Development Network
Stlport_shared-stlport as a dynamic library, this may produce compatibility and some of the lower versions of the Android firmware, currently not recommended for use.
Gnustl_static-Using the GNU libstdc++ as a static library
By default, STLport does not support C + + exception handling and rtti, so do not appear-fexceptions or-frtti; If you really need to, you can use Gnustl_static to support the features of standard C + +, but the resulting file size will be too large. will run less efficiently.
Support C + + exception handling, add Local_cppflags +=-fexceptions in Application.mk, the same support Rtti, then add Local_cppflags +=-frtti, here again to remind you, The second says use Gnustl static library instead of STLport.
Force recompile STLPort, add Stlport_force_rebuild in application.mk: = True to force recompile STLPort source code, for some reasons may need to modify the next STLPort library, General developers do not need to use this
2. Include the associated header file in the CPP file to use the STL, and use the using namespace Std;