No suitable injection token for parameter 'splashScreen' of class 'AppComponent'

I have been trying to compile with the capacitor splash screen in Angular and no matter what I do i get the following errors.

I am hoping someone can tell me what is going on.

Error: src/app/app.component.ts:21:13 - error NG2003: No suitable injection token for parameter ‘splashScreen’ of class ‘AppComponent’.

  • Consider using the @Inject decorator to specify an injection token.*
  • 21 private splashScreen: SplashScreen*
  •                             ~~~~~~~~~~~~*
  • This type does not have a value, so it cannot be used as injection token.*

This is my code …

import { SplashScreen } from ‘@capacitor/splash-screen’;
export class AppComponent {
private platform: Platform,
private authService: AuthService,
private router: Router,
private splashScreen: SplashScreen
) {;

These are my dependencies …

My dependencies are:
“dependencies”: {
@angular/animations”: “^16.0.0”,
@angular/cdk”: “^15.2.9”,
@angular/common”: “^16.0.0”,
@angular/compiler”: “^16.0.0”,
@angular/core”: “^16.0.0”,
@angular/forms”: “^16.0.0”,
@angular/platform-browser”: “^16.0.0”,
@angular/platform-browser-dynamic”: “^16.0.0”,
@angular/router”: “^16.0.0”,
@capacitor/android”: “5.5.1”,
@capacitor/app”: “5.0.6”,
@capacitor/core”: “^5.5.1”,
@capacitor/google-maps”: “^5.3.3”,
@capacitor/haptics”: “5.0.6”,
@capacitor/keyboard”: “5.0.6”,
@capacitor/splash-screen”: “^5.0.6”,
@capacitor/status-bar”: “^5.0.6”,
@ionic/angular”: “^7.5.4”,
“ionicons”: “^7.2.1”,
“rxjs”: “~7.8.0”,
“tslib”: “^2.3.0”,
“zone.js”: "~0.13

Don’t do

private splashScreen: SplashScreen

Just do;

Also, if it’s the app start, you don’t need to call show at all, just call hide when the app is initialized.

Thank you, Julio.

After a long hiatus, I have been taking a course to get back into Android development. The course I am taking is excellent, but in need of an update, especially with the native section. I am learning to read the plugin documentation in the capacitor documentation.