diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e75835db..d603051d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -176,7 +176,9 @@ jobs: - name: Set up cargo cache uses: Swatinem/rust-cache@v2 - - run: cargo check --features wgpu,android-native-activity --target aarch64-linux-android + # Default features disabled to turn off accesskit, which does not work + # with NativeActivity. + - run: cargo check --features wgpu,android-native-activity --target aarch64-linux-android --no-default-features working-directory: crates/eframe # --------------------------------------------------------------------------- diff --git a/crates/eframe/src/lib.rs b/crates/eframe/src/lib.rs index 63c814ab..78208eb5 100644 --- a/crates/eframe/src/lib.rs +++ b/crates/eframe/src/lib.rs @@ -144,6 +144,15 @@ #![warn(missing_docs)] // let's keep eframe well-documented #![allow(clippy::needless_doctest_main)] +// Limitation imposed by `accesskit_winit`: +// https://github.com/AccessKit/accesskit/tree/accesskit-v0.18.0/platforms/winit#android-activity-compatibility` +#[cfg(all( + target_os = "android", + feature = "accesskit", + feature = "android-native-activity" +))] +compile_error!("`accesskit` feature is only available with `android-game-activity`"); + // Re-export all useful libraries: pub use {egui, egui::emath, egui::epaint}; diff --git a/examples/hello_android/Cargo.toml b/examples/hello_android/Cargo.toml index f24b7021..b893f35e 100644 --- a/examples/hello_android/Cargo.toml +++ b/examples/hello_android/Cargo.toml @@ -17,7 +17,11 @@ crate-type = ["cdylib", "lib"] [dependencies] -eframe = { workspace = true, features = ["default", "android-native-activity"] } +eframe = { workspace = true, default-features = false, features = [ + "default_fonts", + "glow", + "android-native-activity", +] } egui_demo_lib = { workspace = true, features = ["chrono"] } # For image support: