Angular 8:NullInjectorError - 没有 HighContrastModeDetector 的提供程序

Zai*_*ain 5 angular-material angular angular8

我正在尝试实现 Angular Material 的数据表,当我运行本地主机时,我最终在控制台中出现以下错误。

NullInjectorError: StaticInjectorError(AppModule)[A11yModule -> HighContrastModeDetector]: 
StaticInjectorError(Platform: core)[A11yModule -> HighContrastModeDetector]: NullInjectorError: 
No provider for HighContrastModeDetector!
Run Code Online (Sandbox Code Playgroud)

我还收到一条警告,指出 Angular Material 版本 (8.2.3) 与 Angular CDK 版本 (9.1.3) 不匹配。它们是否相关以及我将如何匹配这两个版本。无法找到可能与版本不同有关的 Angular Material 核心主题?如果需要的话我可以分享一些代码。感谢所有帮助!