+1 vote

I have a 4.2.2 version Android phone. I know it is old but I broke my phone so I use this for now. I exported my mobile game I made on Godot and tried to install it on my phone but it gave an error. Tried my mother's phone and worked. Tried exporting it on Godot 3.1 with Gles 2 didn't work. As I investigated the problem I saw that min sdk Godot uses to compile apk doesn't include my version of Android. How can I lower this? Should I compile it manually or something?
I mean not many people use 4.2 but when i search for games on playstore most of them support 4.2 and particularly Godot games are the ones not compatible. I think 3% of the android os users use 4.2 and below and my project is a small arcade game not a 3D or complex one. What if I want to support 4.2 too? I don't think it's an important issue but it bugs me to see godot games are incompatible with my old phone while other games made with other engines aren't. Is there a way to solve this issue? I have been searching for a solution but couldn't find one yet for no one cares (can't blame them).

in Engine by (15 points)

1 Answer

+1 vote

You can change the minsdk from on the source code only, and there is no guarantee that will work without problems because was only tested on the current minimum (19 I think).

Change this line
and recompile the template.

by (7,922 points)
[Initial build] Compiling ==> drivers\gles2\rasterizer_canvas_gles2.cpp
b"drivers\\gles2\\rasterizer_canvas_gles2.cpp:1371:4: error: use of undeclared identifier 'glBindVertexArray'\r\n                        glBindVertexArray(cc->array_id);\r\n                        ^\r\ndrivers\\gles2\\rasterizer_canvas_gles2.cpp:1378:2: error: use of undeclared identifier 'glBindVertexArray'\r\n        glBindVertexArray(0);\r\n        ^\r\n2 errors generated.\r\n"
scons: *** [drivers\gles2\rasterizer_canvas_gles2.android.opt.armv7.neon.o] Error 1
scons: building terminated because of errors.

It goes on compiling for 5-7 mins and then gives an error like this even I had changed nothing on the source. I don't know what do I miss. Can anyone familiar with this help me?

Anyway instead I decompiled the godot android template and changed minsdk 18 to 17. Compiled again. Did this for both release and debug. Then added them as custom templates while exporting apk. At least icon shows on my phone but still can't install it. Before this, I tried changing an unsigned exported apk's minsdk value and recompiled it and signed. This time it installed but the game crashed. The game's only a few Area2d's doesn't even involve physics.

custom export template need the same version of the engine used,

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 Frequently asked questions and 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 [email protected] with your username.