I initiated a tauri project using create-tauri and wanted to integrate the global-hotkey library to listen for hotkeys. However, after including the global-hotkey library, without making any changes to the code, running cargo tauri dev results in errors. The error messages are as follows:
error[E0432]: unresolved import `self::platform`
--> C:\Users\aa\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-be2141875385cea5\global-hotkey-0.4.1\src\platform_impl\mod.rs:15:22
|
15 | pub(crate) use self::platform::*;
| ^^^^^^^^ could not find `platform` in `self`
error[E0433]: failed to resolve: could not find `GlobalHotKeyManager` in `platform_impl`
--> C:\Users\aa\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-be2141875385cea5\global-hotkey-0.4.1\src\lib.rs:140:43
|
140 | platform_impl: platform_impl::GlobalHotKeyManager::new()?,
| ^^^^^^^^^^^^^^^^^^^ could not find `GlobalHotKeyManager` in `platform_impl`
error[E0412]: cannot find type `GlobalHotKeyManager` in module `platform_impl`
--> C:\Users\aa\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-be2141875385cea5\global-hotkey-0.4.1\src\lib.rs:134:35
|
134 | platform_impl: platform_impl::GlobalHotKeyManager,
| ^^^^^^^^^^^^^^^^^^^ not found in `platform_impl`
I'm looking for assistance to resolve these errors. Thank you in advance for your help!
I initiated a tauri project using
create-tauri
and wanted to integrate theglobal-hotkey
library to listen for hotkeys. However, after including theglobal-hotkey
library, without making any changes to the code, runningcargo tauri dev
results in errors. The error messages are as follows:I'm looking for assistance to resolve these errors. Thank you in advance for your help!