Closed code-with-max closed 11 months ago
Same error, it seems that the classes from dependencies are not included in the apk's classes.dex and game always crash with java.lang.ClassNotFoundException. I try a lot of different way but no luck
@lettdev @kyadalu1
Solution https://github.com/godotengine/godot/issues/86152#issuecomment-1858817419
@trash-max @lettdev @kyadalu1 The dependencies you're trying to import are not included in the Godot Android library since they're not part of the Godot project; they're part of Google's set of libraries.
To include them in your project, you need to update build.gradle.kts
and the _get_android_dependencies
method with the correct build dependencies.
@m4gr3d Godot relies on kotlin v1.7.0 so i think coroutines needs to be added as separate dependency. In many of my native android projects which uses kotlin v1.9.20 and even for some which uses kotlin v1.8.20, i never had to add couroutines as separate dependency.
Will Godot 4.3 update kotlin version to 1.8 or 1.9?
@m4gr3d Godot relies on kotlin v1.7.0 so i think coroutines needs to be added as separate dependency. In many of my native android projects which uses kotlin v1.9.20 and even for some which uses kotlin v1.8.20, i never had to add couroutines as separate dependency.
Will Godot 4.3 update kotlin version to 1.8 or 1.9?
Yes, we should be able to update the Kotlin version for Godot 4.3.
@m4gr3d Its good to know that kotlin version will be updated for Godot 4.3 but when i try to change it manually like this any idea why it still fails, what else do i need to update?
@m4gr3d Its good to know that kotlin version will be updated for Godot 4.3 but when i try to change it manually like this any idea why it still fails, what else do i need to update?
@kyadalu1 The values shown in the config.gradle
file match the values used by the Godot Editor when it's exporting the Godot app binary. As such, any changes you make locally won't take effect since the values used by the Godot Editor remain the same.
@m4gr3d Can you tell how to update the value in Godot Editor?
I don't see updating the kotlin version option in above screenshot.
Do i have to download godot source code, update kotlin version and somehow recompile the engine for it to take effect?
The values cannot be updated from the Godot Editor.
Do i have to download godot source code, update kotlin version and somehow recompile the engine for it to take effect?
Yes, you would have to rebuild the engine from source for the changes to take effect.
@m4gr3d Can we get kotlin 1.9.20 in Godot 4.3?
@m4gr3d Can we get kotlin 1.9.20 in Godot 4.3?
@m4gr3d Thank you so much
Hello. App died with java.lang.ClassNotFoundException when I used this template.
It`s crashed with any imported classes, not only GoogleApiAvailability, also task.Task and others.
upd: https://github.com/godotengine/godot/issues/86152