I created the
assets folder and put the
ghost.bmp file there.
Just like that:

D:\MyGit\AndroidNative_BasicGame\app\src\main\
assets\
ghost.bmp
Note!
To create the
assets folder, I opened
File Explorer and created a new folder.
This path does not need to be connected to the project anywhere.
In
Android NDK there is a system function
AAssetManager_open that will load any file inside the
assets folder.
Download ghost.bmp ...
Size: 10136 bytes
C++
File my_game.h
class MyGame
{
...
// load assets image
public: void* LoadImage(AAssetManager* pAssetManager, const char* filename, int& fileSize);
};
C++
File my_game.cpp
bool MyGame::InitGraphic_OpenGL(ANativeWindow* pWindow)
{
...
int fileSize = 0;
LoadImage(m_pAssetManager, "ghost.bmp", fileSize);
return true;
}
...
void* MyGame::LoadImage(AAssetManager* pAssetManager, const char* filename, int& fileSize)
{
fileSize = 0;
int readBytesCount = 0;
char* buffer = nullptr;
// open file
AAsset* pAsset = AAssetManager_open(pAssetManager, filename, AASSET_MODE_UNKNOWN);
if (pAsset== nullptr)
return nullptr;
fileSize = AAsset_getLength64(pAsset);
if (fileSize==0)
return nullptr;
buffer = new char [fileSize];
if (buffer== nullptr)
return nullptr;
// read file
readBytesCount = AAsset_read(pAsset, buffer, fileSize);
AAsset_close(pAsset);
if(readBytesCount==fileSize) // good
return buffer;
delete buffer;
return nullptr;
}