简体   繁体   中英

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:

项目结构

Does anyone know where I have to put this file?

Thanks,

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM