Greetings.
I'm trying to port a game that I'm developing to android. The game allows the player to get a random first and last name, and it reads the names from two txt files, called "first_names.txt" and "last_names.txt".
The game works fine on windows, however, when I test it on my cellphone, I get an error saying that the two name files are missing.
I think something is going on with the APK. How can I add those files to the android version?
Add extra files to APK.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Add extra files to APK.
You can't, because Android doesn't have files per se. But if you use renpy.file to open those files, then it will pull them out of the .apk and give you access to them. You might also need to adjust rapt/whitelist.txt to make sure they're included.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: No registered users