I'm trying to migrate my existing custom Splash screen implementation to Android 12. I have implemented it exact same way as mentioned in the provided link : as mentioned in the provided link
When I write following statement in my SplashActivity, it shows error:
SplashActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SplashScreen.installSplashScreen(this);
setContentView(R.layout.activity_splash);
}
the error:
Cannot resolve method 'installSplashScreen' in 'SplashScreen'
for
SplashScreen.installSplashScreen(this);
I have added the following dependency:
implementation 'androidx.core:core-splashscreen:1.0.0-alpha01'