0 votes

I am trying to save a simple .txt or .csv file to android and find no way to solve it.

What I tried in Godot 3.2.1

1) Adding permission request to AndroidManifest.xml manually then
1.1 - going through a FileDialog, for which an unresolved issue exists on Github
where it won't show any files and paths are only editable though entering it manually
1.2 - using File.new() attempt - which results in a chrash

If I print out OS.getuserdir() I get smth like data/data/com.xxxxx.yyy.files
I believe that the path is wrong. "user://" leads to the same path

2) tried adding permission requests through the export GUI then
repeated all above steps

Still no file gets written.

What I tried in Godot 3.2.3
-Same as above in the second approach, not touching the AndroidManifest manually

All approaches lead to:
-> Permission requests always show up on android inside the app settings and also pop up when I ask for them during runtime.
-> the app works but no file gets stored and the path is always data/data/...

I read about compiling the project to use a custom build. When I follow the steps it crashes upon build with the error message: gradle unable to start, some class error
"unsupported class major version 57" I think my gradle version is too high.

SO how can I debug Android on Godot to see the log?
How can I downgrade gradle and which version is needed so I can make a custom build?
Also, how can I import it to Android Studio. If I select the gradle.settings file (which is empty besides a comment) it would tell me it is not a gradle project and misses the above /android folders

in Engine by (18 points)

not user.//filename but user://filename not one dot but double dots ":" after user!

I used "user://"

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.