为什么 opendir() 返回目录在 android 上不存在
Why opendir() returns directory does not exist on android
我正在尝试使用 android 上 dirent.h
头文件中的opendir()
函数,每次运行它时,它都会返回错误NULL
ENOENT
这意味着目录不存在。
我正在尝试将C++游戏移植到安卓,这在 Windows 上工作正常。
我已经检查了目录,它存在于assets/pics/Jason
我是这样称呼它的:
DIR *DIRpointer=opendir("pics/Jason");
还尝试了《/pics/Jason
》而《pics/Jason/
》而且我仍然遇到同样的错误...
我试过谷歌搜索,但没有解决方案。
如果您在 Android 手机中访问资产目录,请尝试使用 AAssetManager 和 AAssetManager_openDir(( 函数
相关文章:
- 我们可以访问一个不存在的联盟的成员吗
- C++:对不存在的命名空间使用命名空间指令
- g++ 说函数不存在,即使包含正确的标头
- 显式 std::exception_ptr 转换为 bool 不存在.VS2010 错误?
- C++ 尝试在不存在的构造函数中引用已删除的函数(使用 rapidJson)
- 查找第一个数组中不存在的元素
- 查找不存在的键时,unordered_map返回什么
- 如何优化代码以返回最接近给定整数的数字,但给定列表中不存在?
- set::find 查找不存在的元素
- 有没有办法将字符串添加到 Vector 中,但前提是它尚不存在?->C++
- inet_ntop返回不存在的地址
- CPP 使用不存在的键访问映射
- 为什么QMediaGaplessPlaybackControl不存在?
- 如果键不存在,使用 [] 运算符访问 STL Map 元素会添加新元素
- 标记未定义的颜色,并且颜色匹配系统中不存在样品
- 为什么minhook库目录不存在
- 为什么 std::vector::p ush_front() 不存在?
- 不存在从"Magick::Color"到"MagickCore::Quantum"的合适转换功能
- 为什么 MDI 子窗口在WM_NCCREATE后不存在?
- 为什么 opendir() 返回目录在 android 上不存在