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

How can I compile the android apk for example/hello_world? #1954

Closed
sry948749099 opened this issue Aug 22, 2022 · 6 comments
Closed

How can I compile the android apk for example/hello_world? #1954

sry948749099 opened this issue Aug 22, 2022 · 6 comments

Comments

@sry948749099
Copy link

sry948749099 commented Aug 22, 2022

I have tried two methods, first, i used FFI compile hello_world to a shared lib, then used MainActivity in android studio, but, get a fatal problem.
111

second, I change the method to use cargo apk build..., but the apk also cannot run in android devices. I also try to use the NativeActivity method in android studio, but error:

111

@emilk
Copy link
Owner

emilk commented Aug 23, 2022

Perhaps @rib or @Zoxc can help out - they have been doing some recent Android work.

@Zoxc
Copy link
Contributor

Zoxc commented Aug 23, 2022

I'd try to follow the eframe example here.

@rib
Copy link
Contributor

rib commented Aug 23, 2022

Yeah, mabe you can take a look at some of the Android examples we have here: https://github.com/rib/android-activity/tree/main/examples, including this agdk-egui example. Those examples each have a README.md with some instructions for how they can be compiled.

We'll hopefully also be adding an eframe based example soon too: https://github.com/rib/android-activity/pull/14

@emilk emilk closed this as completed Aug 23, 2022
@sry948749099
Copy link
Author

@rib
Copy link
Contributor

rib commented Aug 31, 2022

I met this error: rib/android-activity#22 (comment)

This should hopefully be fixed by https://github.com/rib/android-activity/pull/23

Btw @sry948749099 the egui/eframe based example was landed in main recently which you might find more convenient: https://github.com/rib/android-activity/tree/main/examples/agdk-eframe

@inferrna
Copy link

Who need a boilerplate, look at my https://github.com/inferrna/hello_world_android_egui - it compiles and works as just for now.

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

5 participants