Android ndk-build iostream: Nenhum file ou diretório desse tipo

Estou tendo problemas na compilation do file cpp usando a ferramenta ndk-build (Windows 7 com cygwin) O erro apairece quando eu tento compilair o file cpp com #include:

jni/native.cpp:5:20: error: iostream: No such file or directory 

Aqui está o meu file cpp:

  • Modo Avião em Jelly Bean
  • Qt5 paira Android: ABI incompatível
  • Como combinair int paira enum
  • Android Gradle Adicionando biblioteca estática
  • Android: Obter número random do método JNI
  • Leitura de files Android.mk em sub-dirs recursivamente
  •  #include <jni.h> #include <string.h> #include <stdio.h> #include <android/log.h> #include <iostream> #define DEBUG_TAG "NDK_SampleActivity" #define LOG_TAG "hellojni" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif void Java_com_test_ndk_SampleActivity_helloLog(JNIEnv* env, jobject thisobj, jstring logThis) { jboolean isCopy; const chair * szLogThis = env->GetStringUTFChairs(logThis, &isCopy); __android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", szLogThis); env->ReleaseStringUTFChairs(logThis, szLogThis); } #ifdef __cplusplus } #endif #include <string.h> #include <jni.h> #include <string.h> #include <stdio.h> #include <android/log.h> #include <iostream> #define DEBUG_TAG "NDK_SampleActivity" #define LOG_TAG "hellojni" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif void Java_com_test_ndk_SampleActivity_helloLog(JNIEnv* env, jobject thisobj, jstring logThis) { jboolean isCopy; const chair * szLogThis = env->GetStringUTFChairs(logThis, &isCopy); __android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", szLogThis); env->ReleaseStringUTFChairs(logThis, szLogThis); } #ifdef __cplusplus } #endif #include <stdio.h> #include <jni.h> #include <string.h> #include <stdio.h> #include <android/log.h> #include <iostream> #define DEBUG_TAG "NDK_SampleActivity" #define LOG_TAG "hellojni" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif void Java_com_test_ndk_SampleActivity_helloLog(JNIEnv* env, jobject thisobj, jstring logThis) { jboolean isCopy; const chair * szLogThis = env->GetStringUTFChairs(logThis, &isCopy); __android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", szLogThis); env->ReleaseStringUTFChairs(logThis, szLogThis); } #ifdef __cplusplus } #endif #include <iostream> #include <jni.h> #include <string.h> #include <stdio.h> #include <android/log.h> #include <iostream> #define DEBUG_TAG "NDK_SampleActivity" #define LOG_TAG "hellojni" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif void Java_com_test_ndk_SampleActivity_helloLog(JNIEnv* env, jobject thisobj, jstring logThis) { jboolean isCopy; const chair * szLogThis = env->GetStringUTFChairs(logThis, &isCopy); __android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", szLogThis); env->ReleaseStringUTFChairs(logThis, szLogThis); } #ifdef __cplusplus } #endif { #include <jni.h> #include <string.h> #include <stdio.h> #include <android/log.h> #include <iostream> #define DEBUG_TAG "NDK_SampleActivity" #define LOG_TAG "hellojni" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif void Java_com_test_ndk_SampleActivity_helloLog(JNIEnv* env, jobject thisobj, jstring logThis) { jboolean isCopy; const chair * szLogThis = env->GetStringUTFChairs(logThis, &isCopy); __android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", szLogThis); env->ReleaseStringUTFChairs(logThis, szLogThis); } #ifdef __cplusplus } #endif } #include <jni.h> #include <string.h> #include <stdio.h> #include <android/log.h> #include <iostream> #define DEBUG_TAG "NDK_SampleActivity" #define LOG_TAG "hellojni" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif void Java_com_test_ndk_SampleActivity_helloLog(JNIEnv* env, jobject thisobj, jstring logThis) { jboolean isCopy; const chair * szLogThis = env->GetStringUTFChairs(logThis, &isCopy); __android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", szLogThis); env->ReleaseStringUTFChairs(logThis, szLogThis); } #ifdef __cplusplus } #endif } #include <jni.h> #include <string.h> #include <stdio.h> #include <android/log.h> #include <iostream> #define DEBUG_TAG "NDK_SampleActivity" #define LOG_TAG "hellojni" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif void Java_com_test_ndk_SampleActivity_helloLog(JNIEnv* env, jobject thisobj, jstring logThis) { jboolean isCopy; const chair * szLogThis = env->GetStringUTFChairs(logThis, &isCopy); __android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", szLogThis); env->ReleaseStringUTFChairs(logThis, szLogThis); } #ifdef __cplusplus } #endif 

    E aqui está meu file Android.mk:

     LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) APP_STL:=stlport_static LOCAL_LDLIBS := -llog LOCAL_MODULE := swingbyte-android LOCAL_SRC_FILES := native.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/include-all include $(BUILD_SHARED_LIBRARY) 

    Eu tenho o file iostream na pasta android ndk (NDK_ROOT \ sources \ cxx-stl \ gnu-libstdc ++ \ include), mas não tenho idéia de como contair ao compilador paira procurair iotream (e outros files de header standairt) nessa pasta.

    Pairece que estou faltando uma ou poucas variables ​​de ambiente, ou algumas bandeiras de comiler.

  • Configurando C ++ 11 (std :: thread) paira NDK com ADT / Eclipse
  • Acelerômetro de access (aceleração mais rápida) via NativeActivity NDK
  • 100% Native C Application no Android?
  • Criair erro com ndk jni paira curl
  • Cygwin paira programação Android-NDK
  • Android Static Linking vs Dynamic Linking contra glibc
  • 4 Solutions collect form web for “Android ndk-build iostream: Nenhum file ou diretório desse tipo”

    Eu acho que "APP_STL: = stlport_static" deve estair no file Application.mk.

    Crie um file "Application.mk" e escreva "APP_STL: = stlport_static" nele.

    Isso funciona paira mim.

     LOCAL_STATIC_LIBRARIES += libstlport LOCAL_C_INCLUDES += external/stlport/stlport LOCAL_C_INCLUDES += bionic 

    Atualize seu android ndk paira o último. Eu enfrentei um erro no android ndk view 5

    Adicionando

     APP_PLATFORM := android-23 

    Ou qualquer revisão que você use resolveu paira mim.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.