I’m working on a React Native project, and I’m encountering several StrictMode policy violations related to non-SDK API usage during the internal testing phase on the Google Play Store. The warnings are as follows:
09-04 08:31:12.133 22272 22272 D StrictMode: StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/widget/HorizontalScrollView;->mScroller:Landroid/widget/OverScroller;
09-04 08:31:09.881 22272 22487 D StrictMode: StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ljava/lang/reflect/Field;->accessFlags:I
09-04 08:31:09.882 22272 22487 D StrictMode: StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ljava/lang/reflect/Field;->accessFlags:I
09-04 08:31:09.882 22272 22487 D StrictMode: StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ljava/lang/reflect/Field;->accessFlags:I
09-04 08:31:12.289 22272 22272 D StrictMode: StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/widget/ScrollView;->mScroller:Landroid/widget/OverScroller;
These warnings seem to be related to non-SDK APIs used in HorizontalScrollView, ScrollView, and the reflection of accessFlags. My app is running on Android 12, and I’m using React Native with Hermes as the JavaScript engine.
Context:
The issue occurs during the internal testing phase when trying to publish the app on the Google Play Store.
The app runs fine on local devices during development, but these warnings appear in the Play Store’s internal testing environment.
What I’ve Tried:
I searched for the usage of these specific APIs in my codebase but couldn’t find any direct references to OverScroller or accessFlags.
I believe these warnings are coming from underlying libraries or React Native itself.
My Questions:
What could be causing these StrictMode policy violations during Play Store internal testing?
Are there any known fixes or workarounds to suppress these warnings?
Is it safe to ignore these warnings, or should I take any action to ensure my app passes Play Store reviews and remains compatible with future Android versions?
Environment:
- React Native version:
0.74.1
- Hermes: Enabled
- Android version:
12 (SQ1D.220205.004/8151327)
- Play Store Internal Testing