File Operations in Android NDK

前端 未结 5 1537
太阳男子
太阳男子 2020-11-28 03:14

I am using the Android NDK to make an application primarily in C for performance reasons, but it appears that file operations such as fopen do not work correctly in Android.

5条回答
  •  情书的邮戳
    2020-11-28 03:36

    Make sure to use the Java getExternalStorageDirectory() call to get the real path to the sdcard since newer devices don't simply map it to "/sdcard". In that case trying to use a hardcoded location of "/sdcard" will fail.

提交回复
热议问题