我有一个使用 JNI 的 Android 应用程序。在 JNI 中,我使用 C++ STL 库将一些数据输出到文本文件中。这是片段代码。
#include <iostream>
#include <fstream>
float mydata[4] = {0.0f};
ofstream file;
file.open("Data.txt", ios::app);
// For example
file<<mydata[1];
file.close();
当我运行 ndk-build 时,我没有遇到任何错误,并且程序似乎运行正常。但是我在我的应用程序目录中没有找到任何文本文件。有人知道可能是什么问题吗?请帮忙。
谢谢