Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run after updating Rust dependencies #19

Open
darkwater opened this issue Oct 30, 2024 · 2 comments
Open

Can't run after updating Rust dependencies #19

darkwater opened this issue Oct 30, 2024 · 2 comments

Comments

@darkwater
Copy link

I'm trying to get the agdk-eframe example working with up-to-date dependencies:

[dependencies]
log = "0.4"
winit = { version = "0.30", features = [ "android-game-activity" ] }
wgpu = "23.0.0"
pollster = "0.4"
egui = "0.29"
eframe = { version = "0.29", features = [ "wgpu", "android-game-activity" ] }
egui_demo_lib = "0.29"

[target.'cfg(not(target_os = "android"))'.dependencies]
env_logger = "0.11"

[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.14.1"

It builds and installs fine, but on launch it immediately closes and I found this in logcat:

No implementation found for long com.google.androidgamesdk.GameActivity.loadNativeCode(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, android.content.res.AssetManager, byte[]) (tried Java_com_google_androidg
amesdk_GameActivity_loadNativeCode andJava_com_google_androidgamesdk_GameActivity_loadNativeCode__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Landroid_content_res_AssetManager_2_3B) - is the library loaded, e.g. System.loadLibrary? 

Do I need to update some dependencies on the Android side to match? I can't really find any android-activity <-> agdk version compatibility tables, for example.

@DerFetzer
Copy link

I am facing this problem, too.
It seems that upgrading winit to 0.29 or greater and egui and eframe to corresponding versions causes this behavior.
Unfortunately I am no android expert. Any ideas to debug this problem further?

@DerFetzer
Copy link

Just after writing my reply I found this pull request: podusowski/walkers#141
So the solution is to simply bump the version of androidx.games:games-activity to 2.0.2 in your build.gradle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants