The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I have made my first little app with Godot. This program just move an object towards mouse coordinates. But when I try start it in Leapdroid emulator, it shows me that "Unfortunately myapp has stopped". What's wrong with my code? It is only a few lines and hopefully error free:

extends KinematicBody2D

var kovx: int=position.x
var kovy: int=position.y

var betukeszlet ="font")

Called every frame. 'delta' is the elapsed time since the previous frame.

func physicsprocess(delta):
if getviewport().getmouseposition().x<position.x:
elif get

if get_viewport().get_mouse_position().y<position.y:
elif get_viewport().get_mouse_position().y>position.y:


#draw_string(betukeszlet, Vector2(4, 4), "JatX: ")

Maybe I configured Android settings badly? But in this case how can it build an .APK?

Godot version 3.3 Stable Official Win64
in Engine by (52 points)

Now I tried to run my app in Android Studio, but I got the following error message:
What is means?

1 Answer

0 votes

Function getmouseposition() does not work on Android even in the emulator.
Refer to this to see how to achieve the results you are looking for:

by (2,018 points)

Hello magicalogic and thank you for your answer! I didn't know that there are Android specific commands in Godot.
I tried my app without any code, but the situation is the same: Godot can export .APK, but it stopped in Leapdroid. :-(

Have you tried running it in a real Android device?

No, because I have only an LG K8 smartphone with quite few free space.
But maybe did I a mistake when set things in Android Studio? In Android SDK Settings I choose an obsolete NDK instead of NDK (Side by side). Can this cause the error? Should I reinstall this?

Everything is OK now! Just I must check the x86 architecture too when I exporting the APK!

These small mistakes are the worst.

Yes, and I found out by accident. But now I'm happy Godot works properly and I can deal with game making. If all is true, this will be my first Android game.

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.