Your app uses deprecated APIs or parameters for edge-to-edge
Description
Using latest version "react-native-screens": "^4.5.0", when submitting app to play store getting this recommendation not able to publish app on play store .
1 action recommended Your app uses deprecated APIs or parameters for edge-to-edge One or more of the APIs that you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:
android.view.Window.getStatusBarColor android.view.Window.setStatusBarColor android.view.Window.setDecorFitsSystemWindows androidx.core.view.WindowCompat.setDecorFitsSystemWindows android.view.Window.setNavigationBarColor android.view.Window.getNavigationBarColor LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT
These start in the following places:
com.facebook.react.modules.statusbar.StatusBarModule$setColor$1.runGuarded com.facebook.react.modules.statusbar.StatusBarModule.getTypedExportedConstants com.facebook.react.views.view.WindowUtilKt.statusBarHide com.facebook.react.views.view.WindowUtilKt.statusBarShow com.google.android.material.bottomsheet.BottomSheetDialog.onCreate com.google.android.material.internal.EdgeToEdgeUtils.applyEdgeToEdge com.swmansion.rnscreens.ScreenWindowTraits.setColor$react_native_screens_release com.swmansion.rnscreens.ScreenWindowTraits.setNavigationBarColor$react_native_screens_release com.swmansion.rnscreens.ScreenWindowTraits.setNavigationBarTranslucent$react_native_screens_release androidx.activity.EdgeToEdgeApi28.adjustLayoutInDisplayCutoutMode
Please check this many others are facing this issue and not able to publish new version on playstore.
Steps to reproduce
need to publish app on play store . link that other users are also facing this issue : https://github.com/facebook/react-native/issues/48256
Snack or a link to a repository
https://github.com/gauravSharma2009/guidezmobile/tree/android
Screens version
4.5.0
React Native version
0.76.5
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
Thanks for the report. We'll look into it
@gauravSharma2009 ~is this only a warning or is it the reason for rejection in play store?~
Edit 1: ~I overlooked the link. No need for clarification.~
Edit 2: Not true though. All other reports of this issue I see, state that this is only a warning, e.g. https://github.com/dotnet/maui/issues/26788#issuecomment-2573935062, not a reason for rejection. Therefore the initial question remains valid: is this only a warning or is it the reason for rejection in play store?
For my future reference:
- Issue on RN https://github.com/facebook/react-native/issues/48256
- Issue on Flutter https://github.com/flutter/flutter/issues/160328
- Issue on dotnet https://github.com/dotnet/maui/issues/26788
- Temporary solution on RN side: https://github.com/facebook/react-native/pull/44676
The roadmap for this issue is as follows:
- We might apply the temporary solution from RN (linked above ☝)
- At the same time I've marked all the responsible props as deprecated in #2638 and they will be removed in future major (at least few months from now but this timeline is wild guess, no concrete plans exist yet)
yes i'm also getting like those warning of recommendation , did you find any solutions to fix this
we using this version of react-native
"react": "18.3.1",
"react-native": "0.77.0",
and keyboard is hiding textInput at android 15 , its before android 14 textInput goes above of keyboard automatically which is fine.
hi, i have the same issue. any help / guidance appreciated. submitted an app for review .
app used expo react native and on latest versions. expo 53.0.17 and React native 0.79.4.
to the best of knowledge , whatever is recommended in expo is done. for e..g. edge to edge in enabled, react native edge to edge is used.
specifically ,if any one who has the app published already, how these messages are effecting the status of the app , pls share your experience? or is these messages only advisory / warning messages that does not effect the review / current status , if already published.
got the following actions recommended.
1 )Your app uses deprecated APIs or parameters for edge-to-edge
One or more of the APIs that you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:
android.view.Window.setStatusBarColor android.view.Window.setNavigationBarColor android.view.Window.getStatusBarColor android.view.Window.getNavigationBarColor
These start in the following places:
A5.f.g com.facebook.react.modules.statusbar.StatusBarModule$b.runGuarded com.facebook.react.modules.statusbar.StatusBarModule.getTypedExportedConstants com.facebook.react.views.view.o.e com.google.android.material.internal.c.a com.swmansion.rnscreens.c0$b.runGuarded com.swmansion.rnscreens.c0.m com.swmansion.rnscreens.c0.q
To fix this, migrate away from these APIs or parameters.
2 ) Edge-to-edge may not display for all users
From Android 15, apps targeting SDK 35 will display edge-to-edge by default. Apps targeting SDK 35 should handle insets to make sure that their app displays correctly on Android 15 and later. Investigate this issue and allow time to test edge-to-edge and make the required updates. Alternatively, call enableEdgeToEdge() for Kotlin or EdgeToEdge.enable() for Java for backward compatibility.
Yes i m on react-native-screens@latest
Also here is the logs for the ones who are wondering why and where these errors coming
Google:
android.View.Window.setStatusBarColor
'var statusBarColor: Int?' is deprecated. For apps targeting SDK 35 or above this prop has no effect because edge-to-edge is enabled by default and the status bar is always translucent.
w: ~/java/com/swmansion/rnscreens/ScreenViewManager.kt:220:14 'var isStatusBarTranslucent: Boolean?' is deprecated. For apps targeting SDK 35 or above this prop has no effect because edge-to-edge is enabled by default and the status bar is always translucent.
@Deprecated(
"For apps targeting SDK 35 or above this prop has no effect. " +
"Since the edge-to-edge is enabled by default the color is always translucent.",
)
@ReactProp(name = "statusBarColor", customType = "Color")
override fun setStatusBarColor(
view: Screen,
statusBarColor: Int?,
) {
view.statusBarColor = statusBarColor
}
w: ~/java/com/swmansion/rnscreens/ScreenViewManager.kt:237:14 'var navigationBarColor: Int?' is deprecated. For all apps targeting Android SDK 35 or above edge-to-edge is enabled by default.
w: ~/java/com/swmansion/rnscreens/ScreenViewManager.kt:246:14 'var isNavigationBarTranslucent: Boolean?' is deprecated. For all apps targeting Android SDK 35 or above edge-to-edge is enabled by default.
Please offer a solution to this issue to continue building our apps
Same issue here as well, react native 0.81
+1
Since August 31st the required targetSDK level for Google Play Store is 35 & this means that we can get rid of some of the code that triggers deprecation warnings on the library side. I've added it onto our ticket board & we'll see to it shortly.
same problem here any solution ?
+1
Any news? :)
+1
Hi, PR with changes that should fix those warning has been already merged to main. if you can't wait for the next release (unfortunately this might still take some time), you can try one of the nightly 4.17.0 releases available on npm (link) - they are released automatically every day.