I found it's helpful to add stl "stlport_static" in build.gradle
Alexey Toropov於 2014年2月10日星期一UTC+8下午11時35分33秒寫道: > > I have next structure: > - src > > - main > > - jni > > - Android.mk > > - Application.mk > > - <source_files> > > - java > > - res > > > One of my source files has lines: > #include <vector> > #include <string> > > vector and string are classes of Default C++ Library, but Android Studio > shows me an error: > > *d:/<..project_path..>/src/main/jni/<...>.hh:6:18: fatal error: vector: No > such file or directory* > *compilation terminated.* > *make.exe: *** <...>* > > *FAILURE: Build failed with an exception.* > > ** What went wrong:* > *Execution failed for task ':<..project_name..>:compileReleaseNdk'.* > *> com.android.ide.common.internal.LoggedErrorException: Failed to run > command:* > * D:\<..ndk_path..>\ndk-build.cmd NDK_PROJECT_PATH=null > APP_BUILD_SCRIPT=D:\<..project_path..>\build\ndk\release\Android.mk > APP_PLATFORM=android-19 NDK_OUT=D:\<..project_path..>\build\ndk\release\obj > NDK_LIBS_OUT=D:\<..project_path..>\build\ndk\release\lib APP_ABI=all* > *Error Code:* > * 2* > *Output:* > * In file included from D:<..project_path..>\src\main\jni\<...>.cpp:1:0:* > * d:/<..project_path..>/src/main/jni/<...>.hh:6:18: fatal error: vector: > No such file or directory* > * compilation terminated.* > * make.exe: *** > [D:\<..project_path..>\build\ndk\release\obj/local/armeabi/objs/<..project_name..>/D_\<..project_path..>\src\main\jni\<...>.o] > > Error 1* > > > ** Try:* > *Run with --stacktrace option to get the stack trace. Run with --info or > --debug option to get more log output.* > > My Application.mk file has line "APP_STL := stlport_static". > > Using Windows command line the lib builds correctly and without such > errors. > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
