Skip to content

Don't work with new bevy version #503

@MatiM72737

Description

@MatiM72737

Describe the bug
when try to use with bevy 0.18 version it's not lunching because that bevy version use new android activity insted of Native

Steps To Reproduce
use bevy template and set dependenties to
[dependencies]
bevy = { version = "0.18" }

Expected behavior
compile install and run app with cargo android run

Platform and Versions (please complete the following information):
Host OS: Windows 11 pro
Target OS: android 11
Rustc: 1.90.0
[✔] cargo-mobile v0.22.2
• Contains commits up to ""
• Installed at "C:\Users\MatiM\.cargo\.cargo-mobile2"
• Windows 11 v10.0
• rustc v1.90.0 (1159e78c4 2025-9-14)

[✔] Android developer tools
• SDK v36.0.0 installed at "C:\Android\Sdk"
• NDK v26.1.10909125 installed at "C:\Android\Sdk\ndk
\26.1.10909125"

[✔] Connected devices
(Mi 9 Lite)ite
Additional context
Finished dev profile [unoptimized + debuginfo] target(s) in 3m 43s

[Incubating] Problems report is available at: file:///C:/Users/MatiM/Documents/GitHub/bevy-3d-cubes/gen/android/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
Performing Streamed Install
Success
Starting: Intent { cmp=com.github.noreply.users.bevy_3d_cubes/android.app.NativeActivity }
java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
at android.os.Parcel.createExceptionOrNull(Parcel.java:2376)
at android.os.Parcel.createException(Parcel.java:2360)
at android.os.Parcel.readException(Parcel.java:2343)
at android.os.Parcel.readException(Parcel.java:2285)
at android.hardware.input.IInputManager$Stub$Proxy.injectInputEvent(IInputManager.java:1012)
at android.hardware.input.InputManager.injectInputEvent(InputManager.java:907)
at com.android.commands.input.Input.injectKeyEvent(Input.java:355)
at com.android.commands.input.Input.access$100(Input.java:41)
at com.android.commands.input.Input$InputKeyEvent.sendKeyEvent(Input.java:203)
at com.android.commands.input.Input$InputKeyEvent.run(Input.java:190)
at com.android.commands.input.Input.onRun(Input.java:107)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:60)
at com.android.commands.input.Input.main(Input.java:71)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:463)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.input.InputManagerService.injectInputEventInternal(InputManagerService.java:823)
at com.android.server.input.InputManagerService.injectInputEvent(InputManagerService.java:797)
at android.hardware.input.IInputManager$Stub.onTransact(IInputManager.java:459)
at android.os.Binder.execTransactInternal(Binder.java:1157)
at android.os.Binder.execTransact(Binder.java:1126)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions