admin管理员组

文章数量:1417426

I've updated multiple of my apps to try and support the new edge-to-edge requirements for Android 15. For some of the projects I get the following warning on Google: Your app uses deprecated APIs or parameters for edge-to-edge

I managed to fix some of them, but I can not find the cause of the last two. I do not call the deprecated methods in any of my classes, and I tried updating all the used styles to material3 (not sure if relevant). I tried looking in my mapping.txt file to see exactly what the problem was and found

androidx.core.view.WindowCompat$Api30Impl -> androidx.core.view.j0$b:
# {"id":"sourceFile","fileName":"WindowCompat.java"}
1:4:void setDecorFitsSystemWindows(android.view.Window,boolean):167:167 -> a

and

com.google.android.material.internal.EdgeToEdgeUtils -> com.google.android.material.internal.c:
# {"id":"sourceFile","fileName":"EdgeToEdgeUtils.java"}
5:16:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):83:83 -> a
17:27:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):85:85 -> a
28:42:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):88:88 -> a
43:48:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):90:90 -> a
49:54:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):93:93 -> a
55:57:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):97:97 -> a
58:65:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):99:99 -> a
66:73:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):100:100 -> a
74:76:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):102:102 -> a
77:79:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):103:103 -> a
80:91:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):107:107 -> a
92:94:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):105:105 -> a
95:102:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):111:111 -> a
103:106:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):110:110 -> a
107:110:void applyEdgeToEdge(android.view.Window,boolean,java.lang.Integer,java.lang.Integer):108:108 -> a
8:13:int getNavigationBarColor(android.content.Context,boolean):159:159 -> b
14:19:int getNavigationBarColor(android.content.Context,boolean):161:161 -> b
20:28:int getNavigationBarColor(android.content.Context,boolean):162:162 -> b
29:33:int getNavigationBarColor(android.content.Context,boolean):167:167 -> b
8:13:int getStatusBarColor(android.content.Context,boolean):142:142 -> c
14:19:int getStatusBarColor(android.content.Context,boolean):146:146 -> c
20:28:int getStatusBarColor(android.content.Context,boolean):147:147 -> c
29:33:int getStatusBarColor(android.content.Context,boolean):152:152 -> c
1:15:boolean isUsingLightSystemBar(int,boolean):171:171 -> d
1:8:void setLightNavigationBar(android.view.Window,boolean):136:136 -> e
9:12:void setLightNavigationBar(android.view.Window,boolean):137:137 -> e
1:8:void setLightStatusBar(android.view.Window,boolean):123:123 -> f
9:12:void setLightStatusBar(android.view.Window,boolean):124:124 -> f

But, I cannot find how or why my project makes these calls. Strangely the other project where I managed to fix all the edge-to-edge issues did not have this one and is also very similar to the one I have the problem with.

What strategy can I use to try and track down what is causing this? Also, is there a way to test whether there is any deprecated edge to edge code directly from Android Studio? Right now, the only place I can get the warning is from Google Play after doing an upload.

Notes, not sure if relevant:

  • I am using java with .xml layout files. I use android:fitsSystemWindows="true" in both project activities, since we make heavy use of the toolbar and it refuses to work properly without it.

本文标签: androidHow to track down what is using Google EdgetoEdge deprecated APIs or ParametersStack Overflow