react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

Your app uses deprecated APIs or parameters for edge-to-edge

Open gauravSharma2009 opened this issue 11 months ago • 4 comments

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

gauravSharma2009 avatar Jan 17 '25 14:01 gauravSharma2009

Thanks for the report. We'll look into it

kkafar avatar Jan 17 '25 17:01 kkafar

@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:

  1. Issue on RN https://github.com/facebook/react-native/issues/48256
  2. Issue on Flutter https://github.com/flutter/flutter/issues/160328
  3. Issue on dotnet https://github.com/dotnet/maui/issues/26788
  4. Temporary solution on RN side: https://github.com/facebook/react-native/pull/44676

kkafar avatar Jan 20 '25 10:01 kkafar

The roadmap for this issue is as follows:

  1. We might apply the temporary solution from RN (linked above ☝)
  2. 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)

kkafar avatar Jan 20 '25 14:01 kkafar

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",

Image

and keyboard is hiding textInput at android 15 , its before android 14 textInput goes above of keyboard automatically which is fine.

getsettalk avatar Apr 30 '25 10:04 getsettalk

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.

varaprasad31 avatar Jul 07 '25 05:07 varaprasad31

Yes i m on react-native-screens@latest

Image

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

devhik0 avatar Jul 19 '25 01:07 devhik0

Same issue here as well, react native 0.81

Hyperrick avatar Sep 11 '25 21:09 Hyperrick

+1

aliceni81 avatar Sep 25 '25 06:09 aliceni81

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.

kkafar avatar Sep 25 '25 09:09 kkafar

same problem here any solution ?

rafaelperazzo avatar Sep 25 '25 17:09 rafaelperazzo

+1

Tribanocci avatar Sep 27 '25 23:09 Tribanocci

Any news? :)

j-q-in-berlin avatar Sep 29 '25 12:09 j-q-in-berlin

+1

WilliamWatcher avatar Oct 13 '25 08:10 WilliamWatcher

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.

kligarski avatar Oct 13 '25 09:10 kligarski