【发布时间】:2014-08-26 12:44:23
【问题描述】:
在我的 android NDK 应用程序中,我可以定义 wstring str = L"my string"。它编译和链接很好。
当我使用 __android_log_print(ANDROID_LOG_DEBUG, "tag", "JNI got initialized ...%S", str);
这是打印 JNI got initialized ...S,但我希望打印“JNI got initialized ...my string”
注意:我的 Application.mk 中有 APP_STL: = gnustl_static
提前问好。
【问题讨论】:
-
尝试 %s 而不是 %S
-
是的,但我需要传递 WSTRING,如果我使用 %s 的浪费,它只会给出第一个字符。
-
基本上这是一个简单的 sn-p,我的 NDK 模块需要大量 wstring 支持。这是我面临的主要问题。
标签: android c++ linux android-ndk