bevy_asset undeclared imports #7135
-
Bevy versionThe release number or commit hash of the version you're using. [Optional] Relevant system informationRust version: cargo 1.68.0-nightly (8c460b223 2023-01-04) What you didI tried to use bevy_kira_audio to play an mp3 audio file. What went wrongAs soon as I enabled the mp3 feature I got a series of 'undeclared import' errors originating from the bevy_asset (0.9.1) crate. Additional information
Error log: error[E0433]: failed to resolve: use of undeclared crate or module error[E0432]: unresolved imports |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The error messages you have strangely suggest that the crates registry has been edited? That error message shows a different line 9 than the file actually has (looking at https://docs.rs/crate/bevy_asset/latest/source/src/asset_server.rs) We cannot support editing the crates within the crates registry cache of cargo, as that is not supported by cargo. But perhaps running |
Beta Was this translation helpful? Give feedback.
-
You shouldn't enable the bevy |
Beta Was this translation helpful? Give feedback.
You shouldn't enable the bevy
mp3
feature if you are usingbevy_kira_audio
, instead you should enablebevy_kira_audio
'smp3
feature. Regardless, @DJMcNab answer should fix your current issue.