-
Notifications
You must be signed in to change notification settings - Fork 40
Support manifest XML overriding, dex insertion and multiple activities #72
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
Conversation
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Google Play will require this starting August 31 2025. The default of `23` for `min_sdk_version` is retained, allowing apps to be installed all the way back to Android 6.0. https://developer.android.com/google/play/requirements/target-sdk
…shes Both `log` and `android-activity` seem to be creating vectors or slices from NULL pointers, which was already invalid but the standard library now asserts and panics on. Since both have been fixed, upgrade all dependencies to get the local and CI runs working again. To keep duplicate dependencies to a minimum, upgrade `ndk` to `0.9` as well which now uses `OwnedFd`/`BorrowedFd` to accurately represent ownership transitions. This allows us to convert the `looper` example to safe `rustix` bindings.
|
Changed |
|
Fixed the problem "Dex data is not appended to the APK when the application is compiled for the first time". Used If requiring the application crate's build script to put the I just realized that https://github.com/mzdk100/cargo-apk2 is currently making more agressive changes, probably inspired by this PR. It's supporting specifying a Java source folder dedicated for the |
|
This should not have been targeting the temporary Please have a little more patience before opening new PRs. While I appreciate your enthusiasm, your work and implementation doesn't align with the future plans I have for
That is the nature of the Rust (Android?) ecosystem. Isolated copy-paste repositories (based on your PR?) instead of collaboration. |
Excuse me, the previous #71 is closed, and some fixes are made here to recover my breaking changes.
Why did I make the breaking change for the
activityelement in the manifest?When I added multiple activities in the overrided XML manifest file,
cargo-apkstill needs to parse the file intoAndroidManifest; while the overriding feature makes specifying manifest elements unsupported byndk-buildpossible, the singleactivitystruct item still conflicts with multiple activity items declared in the XML (I got an runtime error); thus I have to change it.I've tried this:
It doesn't work, and this compilation warning occured:
I changed the code again in order to avoid this breaking change, so
[package.metadata.android.application.activity]will not need changing to[[package.metadata.android.application.activity]], and other activities can be declared asother_activity):However, this prevents
ndk-buildfrom parsing the manifest XML's multiple activities (except the first), the deserialing keyother_activityis for TOML; but the information of extra activities is not needed bycargo-apkitself when performing manifest XML override...So I gave up the idea of deserializing the XML file "perfectly" (who will use this feature of
ndk-build?); I recovered theactionsandcategorieselements for the intent filter toVec<String>as well (side note: I forgot to update the documentation when I changed these items).Further changes are probably needed.
Multiple activities & dex insertion test based on https://github.com/wuwbobo2021/jni-min-helper/tree/perm:
Click to expand
Cargo.toml:build.rs:main.rs:Current problem of dex insertion: it's not appended to the APK when the application is compiled for the first time, but it's added while running
cargo apk buildfor the second time.