kloder-games / godot-gpgs

Godot Module for Google Play Game Services
MIT License
55 stars 16 forks source link

Game crashes on startup #13

Open maxpilotto opened 6 years ago

maxpilotto commented 6 years ago

I've wrote a simple demo to check if the module was working but when I launch the game it crashes. This is the content of the logcat:

java.lang.ClassNotFoundException: Didn't find class "org/godotengine/godot/GodotGooglePlayGameServices" 
on path: DexPathList[[zip file "/data/app/org.godotengine.mygame-2/base.apk"],
nativeLibraryDirectories=[/data/app/org.godotengine.mygame-2/lib/arm, 
/data/app/org.godotengine.mygame-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
 at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
 at org.godotengine.godot.GodotLib.setup(Native Method)
 at org.godotengine.godot.Godot$2.run(Godot.java:299)
 at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1477)
 at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1259)

And this is the code I've attached to my main (and only) scene:

extends Node2D

var gps = null

func _ready():
    if Globals.has_singleton("GodotGooglePlayGameServices"):
        gpgs = Globals.get_singleton("GodotGooglePlayGameServices")
        gpgs.init(get_instance_id())
        gpgs.signIn()

And this is what I've added to the project.godot file

[android]
modules="org/godotengine/godot/GodotGooglePlayGameServices"
homarox commented 5 years ago

same problem :(