Skip to content

bugfix android activity#24418

Open
oelison wants to merge 1 commit into
bevyengine:mainfrom
oelison:bugfix-android-activity
Open

bugfix android activity#24418
oelison wants to merge 1 commit into
bevyengine:mainfrom
oelison:bugfix-android-activity

Conversation

@oelison
Copy link
Copy Markdown
Contributor

@oelison oelison commented May 24, 2026

  • update android-activity to 0.6.1 from crate bevy_android

Issue: NO-TICKET (not found)

Objective

The android-activity 0.6.0 is no longer compatible. This makes android-activity = "0.6" to less restrictive.

Solution

I asked in the Discord and it looks like a dedicated version is most practical. android-activity = "0.6.1" At least it is now compatible with gamesActivity from here: libs.versions.toml L8.

Testing

Created the example on my own system. It is now working on emulator and real devices. I was a long time struggeling with this missing constraint, because I had still the old 0.6.0 on my system.

* update android-activity to 0.6.1 from crate bevy_android

Issue: NO-TICKET (not found)
@oelison
Copy link
Copy Markdown
Contributor Author

oelison commented May 24, 2026

I have tested this also with the PR #23491. I had a lot of problems to get it working. Now it works on the main, this PR and in my demo for VR/XR. I think this is very urgent for consistency. Reviews are welcome!

@beicause beicause added this to the 0.19 milestone May 25, 2026
@kfc35 kfc35 added O-Android Specific to the Android mobile operating system C-Dependencies A change to the crates that Bevy depends on labels May 25, 2026
@oelison
Copy link
Copy Markdown
Contributor Author

oelison commented May 25, 2026

Thanks for the review and the labels. Is there any need to restart the checks? One was failing due to a timeout.

Copy link
Copy Markdown
Contributor

@leomeinel leomeinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy that this seems to have fixed the difficulies you ran into with #23491 and generally think that this is a better idea than using 0.6.0 here.

Note

This has also been discussed here

@kfc35
Copy link
Copy Markdown
Contributor

kfc35 commented May 26, 2026

Thanks for the review and the labels. Is there any need to restart the checks? One was failing due to a timeout.

The maintainers can re-trigger them if need be before merge I believe

@kfc35 kfc35 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 26, 2026
Copy link
Copy Markdown
Contributor

@ChristopherBiscardi ChristopherBiscardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bevy_android doesn't contain any logic that requires this dependency to be bumped, and the issue you ran into in the associated discord conversation was related to a partially stale lockfile, as far as I can tell.

winit also uses 0.6.0: https://github.com/rust-windowing/winit/blob/c4afadbfabf7b1e7989b40b493db1a4c7bd8ff4e/Cargo.toml#L51

I asked in the Discord and it looks like a dedicated version is most practical.

Please link discord conversations if you reference them. There isn't much substance in this one supporting this change: https://discord.com/channels/691052431525675048/757316314845937785/1507716259985231923


We could arbitrarily bump this dependency, but I don't see a strong reason to

@beicause
Copy link
Copy Markdown
Member

beicause commented May 26, 2026

bevy_android doesn't contain any logic that requires this dependency to be bumped, and the issue you ran into in the associated discord conversation was related to a partially stale lockfile, as far as I can tell.

winit also uses 0.6.0: https://github.com/rust-windowing/winit/blob/c4afadbfabf7b1e7989b40b493db1a4c7bd8ff4e/Cargo.toml#L51

I asked in the Discord and it looks like a dedicated version is most practical.

Please link discord conversations if you reference them. There isn't much substance in this one supporting this change: https://discord.com/channels/691052431525675048/757316314845937785/1507716259985231923

We could arbitrarily bump this dependency, but I don't see a strong reason to

The latest mobile example needs 0.6.1 (I should have bumped android-activity as well in #23551), otherwise the mobile example may not run. Is this a reason?

I think Bevy should consider compatibility with the GameActivity of the mobile example. winit doesn't contain an Android example so naturally it doesn't need to worry about the android-activity version.

@oelison
Copy link
Copy Markdown
Contributor Author

oelison commented May 26, 2026

Even actual android example from the main needs 0.6.1 to work. So it should be >= 0.6.1 but = 0.6 is too weak.

@leomeinel
Copy link
Copy Markdown
Contributor

leomeinel commented May 26, 2026

I have tested this also with the PR #23491. I had a lot of problems to get it working. Now it works on the main, this PR and in my demo for VR/XR.

Just running cargo update in the project that ran into this problem should have solved the problem you ran into aswell.

Even actual android example from the main needs 0.6.1 to work. So it should be >= 0.6.1 but = 0.6 is too weak.

I do however still think that since the current example needs 0.6.1, there is a good reason to bump it since that will avoid having to issue cargo update and will most likely avoid confusion for some people.

@ChristopherBiscardi
Copy link
Copy Markdown
Contributor

The latest mobile example needs 0.6.1 (I should have bumped android-activity as well in #23551), otherwise the mobile example may not run. Is this a reason?

That PR description is incorrect:

rust-mobile/android-activity@v0.6.1 (release) requires GameActivity 4.4.0

android-activity@0.6.1 does not require GameActivity@4.4.0. This is explicitly called out in the release notes that the PR links to:

This release has been tested with the androidx.games:games-activity:4.4.0 stable
release, and is backwards
compatible with the 4.0.0 stable release.


If we've written the Android example to require 0.6.1 (and not 0.6.0) then the example can specify that dependency to ensure the requirements are met.

This PR's dependency update is for the bevy_android crate, not the example. I don't think it makes sense to bump this lower bound in the crate unless we know there's no possible way an application could work with 0.6.0

It is also notable that bevy_android is essentially one line of code: a static; OnceLock<AndroidApp>, which makes it highly unlikely that this would be true.

@beicause
Copy link
Copy Markdown
Member

@ChristopherBiscardi Note that android-activity 0.6.0 requires GameActivity 2.0, android-activity 0.6.1 requires GameActivity 4.0. They are incompatible.

@beicause
Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Dependencies A change to the crates that Bevy depends on O-Android Specific to the Android mobile operating system S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants