File Operations in Android NDK

前端 未结 5 1516
太阳男子
太阳男子 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:49

    I want to add my two cents to the answers here, on top of setting the correct permissions specified in the answer to this question, make sure to give your app permission to access the storage in the OS. The permissions menu could change from phone to phone, an easy way to get to it is by going to the Settings menu and then searching for "Permissions." This will give you a chance to give your app permission to access the storage (ie sdcard directory) from NDK code.

提交回复
热议问题