Export to Android using Gradle Build
Asked Answered
W

3

0

Hey everyone! I'm currently working on a mobile game that utilizes Google Play Game Services (GPGS), which requires me to use a Gradle build. I'm currently using Godot 4.1.3. I've encountered an issue while testing the game on my phone, as I'm receiving the following error message:

Cannot remove non-existent file or directory: C:/Users/$USER/AppData/Local/Godot/tmpexport.1699031438.apk

At first, I thought this problem was related to GPGS, but even after disabling it, the same error persisted. To investigate further, I created a new project with just a button and was able to test it on my phone without using Gradle Build. However, as soon as I enabled Gradle Build, the same error reappeared. I then attempted to run the Android build directly from Android Studio, and it seemed to work fine. So, I'm not entirely sure what's causing this issue or where I might be going wrong. I would greatly appreciate any assistance or insights you can provide. <3

Wauters answered 3/11, 2023 at 18:15 Comment(0)
W
0

So, for anyone who might have the same issue; I already fixed it. I tried a lot of things so I don't know the exact cause of the problem (or if there were multiple problems). What I did was to completely uninstall OpenJDK and all the Android SDK packages I had installed (in my case, I had old SDK versions from older projects as well as the ones recomended by Godot, so I don't know if that interfered in any way). Then, I followed again all of the steps in: https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_android.html by installing the latest Android Studio version and installing all the required packages, making sure that the installed version was the one suggested by Godot in each package (by clicking Show Package Details you can make sure of this). Also, when creating the debug.keystore I made sure that all the environment variables were setup correctly for it to generate as intended.

TL;DR: I uninstalled all the needed packages and installed them again.

Wauters answered 3/11, 2023 at 21:49 Comment(0)
C
0

I haven't figured out exactly what "Use Gradle Build" means. I know that Gradle is a build tool, like SCons and make. I've used it in Android Studio. But I don't know how it fits in here.

Catamenia answered 3/11, 2023 at 23:14 Comment(0)
M
0

Sounds like a bug. If you report this issue, someone there may know of a solution for you.

Maximilien answered 3/11, 2023 at 23:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.