Takachi
Takachi

Reputation: 751

FileNotFoundException when accessing an image with Korge

I have an Android application and I used Korge dependencies to make my game. I'm trying to load an image and I got a FileNotFoundException exception, wherever I put the file. Here's my code :

val topArrowImg = resourcesVfs["top_arrow.png"].readBitmap()

And my project structure :

Project structure

Does anyone know where I have to put this file ?

Thanks,

Upvotes: 0

Views: 129

Answers (1)

jakobeha
jakobeha

Reputation: 121

resourcesVfs points to files in src/main/res, e.g. resourcesVfs["top_arrow.png"] points to the file at src/main/res/top_arrow.png

Upvotes: 0

Related Questions