Android export was working, now am getting strange error

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Robster
:warning: Old Version Published before Godot 3 was released.

Hi all,

I had it building to my phone both via an APK and via a remote debug using the android icon near the play button.

Then a few days of code passed and I try to build the APK. When I run it I get the following error:

android parse error there was a problem while parsing the package from my phone when clicking on the APK file.

I then went to run it via remote debug using the android icon and nothing… it builds, does all the bits and then… nothing appears on my phone.

The Debugger does show the following though:

When I look at those signals on the textureButtons though, they ARE connected to a function and the function has code. For all of them. I’m a but confused and stuck as well.

Has anyone come across this kind of thing before?

EDIT: I can run it from within Godot not a problem (F5). I can’t export to OS X either (I’m running OS X). Something is awry…

:bust_in_silhouette: Reply From: molamar

Hm… you added the connection for the buttons twice? Via Signals and within in Code?
If you do so, the debugger throws these error like in your picture.

I’m quite sure I didn’t. By memory I think I added them via the signals tool in the IDE. I then unconnected them, deleted the old functions and connected again, with new functions.

I can’t see how I could correct this error as the old functions don’t exist. Do you have an idea of what I could try? Thanks a tonne…

Robster | 2016-12-12 11:30

The old (callback) functions have nothing to do with the error i guess.
Just for clarify:
If i’am talking about functions in this case, i mean the callback function which is executed if the button is pressed, something like this:

func _on_button_pressed():
get_node(“Label”).set_text(“button is pressed”)

But that this could happen during your program is running, you’ll have to say if which button is pressed and then execute which part of code(the callback function).

So this could be done within the IDE and the Node/Signals. Or you do this in your code, something like:

func _ready():
get_node(“Button”).connect(“pressed”,self,“_on_button_pressed”)

That means get the buttonnode and connect it with the function “on button pressed”.
Execute its code when the buttonnode is pressed.“self” means that the .connect method and the Callback are in the same Script/Class.

Back to the error: it says: hey, there are two times a button connected with a callback, what is obviously not necessary ( and some more connections like release and so on)

If you wanna do more than one thing after a button is pressed you’ have to do it like:
func _on_button_pressed():
DoSomething():

DoEvenMoreSomething():

molamar | 2016-12-12 15:10

Thanks again for your answer. I’ve been digging and digging and eventually found it’s not just android but all platform exports.

So using my native OSX export I ran my game from the command line and this is the error it spits out:

ERROR: create: Condition ' !create_func ' is true. returned: 0
   At: core/os/mutex.cpp:39.
nscreen count 1
SCRIPT ERROR: GDScript::load_byte_code: Compile Error: Identifier not found: getnodehere
   At: res://stats.gdc:21.
ERROR: load_byte_code: Method/Function Failed, returning: ERR_COMPILATION_FAILED
   At: modules/gdscript/gd_script.cpp:728.
ERROR: load: Condition ' err!=OK ' is true. returned: RES()
   At: modules/gdscript/gd_script.cpp:1859.
ERROR: load: Failed loading resource: res://stats.gd
   At: core/io/resource_loader.cpp:218.
ERROR: poll: Can't load dependency: res://stats.gd
   At: core/io/resource_format_binary.cpp:681.
ERROR: load: Condition ' err!=OK ' is true. returned: RES()
   At: core/io/resource_loader.cpp:142.
ERROR: load: Failed loading resource: res://stats.tscn
   At: core/io/resource_loader.cpp:218.
ERROR: poll: Can't load dependency: res://stats.tscn
   At: core/io/resource_format_binary.cpp:681.
ERROR: load: Condition ' err!=OK ' is true. returned: RES()
   At: core/io/resource_loader.cpp:142.
ERROR: load: Failed loading resource: res://iceShelf.tscn
   At: core/io/resource_loader.cpp:218.
ERROR: poll: Can't load dependency: res://iceShelf.tscn
   At: core/io/resource_format_binary.cpp:681.
ERROR: load: Condition ' err!=OK ' is true. returned: RES()
   At: core/io/resource_loader.cpp:142.
ERROR: load: Failed loading resource: res://gameLevel.tscn
   At: core/io/resource_loader.cpp:218.
ERROR: start: Failed loading scene: res://gameLevel.tscn
   At: main/main.cpp:1464.
ERROR: ~List: Condition ' _first!=__null ' is true.
   At: core/self_list.h:82.
ERROR: ~List: Condition ' _first!=__null ' is true.
   At: core/self_list.h:82.
ERROR: free: Attempt to free invalid ID
   At: servers/spatial_sound/spatial_sound_server_sw.cpp:615.
ERROR: free: Attempt to free invalid ID
   At: servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp:612.
WARNING: cleanup: ObjectDB Instances still exist!
   At: core/object.cpp:1944.
ERROR: clear: Resources Still in use at Exit!
   At: core/resource.cpp:406.
ERROR: free_static: Condition ' !MemoryPoolStatic::get_singleton() ' is true.
   At: core/os/memory.cpp:58.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Now I can run the game just fine from within the editor, but not when I compile. I can’t see why it wouldn’t be able to find the various resources as that’s where they’re located. For example. The error ERROR: load: Failed loading resource: res://stats.gd. When I look in the editor, the location of the file is res://stats.gd. That was a straight copy and paste out of Godot.

Can you recommend anything? I’m stumped.

Robster | 2016-12-19 05:52