Conversation
- Add glue file and jni interface file to target;
- Generate android apk package at install stage;
- Use adb to run the android app.
Summary of ChangesHello @waruqi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances Xmake's capabilities by integrating robust support for Android native application development. It introduces a new Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for Android native applications, including new examples for LVGL and Raylib, and the necessary xmake rules. The implementation of the new android.native_app rule is well-structured and covers packaging, installation, and running. The examples are a great addition. I've found a few issues in the C code for the LVGL examples, mainly related to resource management (memory leaks) and code robustness. I've also pointed out a security concern with hardcoded passwords in the example xmake.lua files.
| target:set("kind", "shared") | ||
|
|
||
| -- add glue file to target | ||
| local native_app_glue_file = path.join(ndk_root, "sources", "android", "native_app_glue", "android_native_app_glue.c") |
There was a problem hiding this comment.
I don't think this should be automatically added when working on Android, you may want to have your own glue using the NDK (as I did).
Maybe add a way to disable the native glue?
There was a problem hiding this comment.
True, the GLFM library, for example doesn't need it (unless I didn't notice it). I'm working on a project where I used it before switching to GLFM, so being able to disable it would be welcome.
Uh oh!
There was an error while loading. Please reload this page.