Disallow `accesskit` on Android NativeActivity, making `hello_android` working again (#6855)
Follow up for https://github.com/emilk/egui/pull/6766 I wasn't sure if `compile_error` is appropriate. It felt right.
This commit is contained in:
parent
cb4acbc262
commit
12cd35f48c
|
|
@ -176,7 +176,9 @@ jobs:
|
||||||
- name: Set up cargo cache
|
- name: Set up cargo cache
|
||||||
uses: Swatinem/rust-cache@v2
|
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
|
working-directory: crates/eframe
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,15 @@
|
||||||
#![warn(missing_docs)] // let's keep eframe well-documented
|
#![warn(missing_docs)] // let's keep eframe well-documented
|
||||||
#![allow(clippy::needless_doctest_main)]
|
#![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:
|
// Re-export all useful libraries:
|
||||||
pub use {egui, egui::emath, egui::epaint};
|
pub use {egui, egui::emath, egui::epaint};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,11 @@ crate-type = ["cdylib", "lib"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[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"] }
|
egui_demo_lib = { workspace = true, features = ["chrono"] }
|
||||||
|
|
||||||
# For image support:
|
# For image support:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue