Any clue on how to fix StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation?
Asked Answered
C

1

19

I ran some sample automated testing in a sample app and got the warining below. But teh text does not really say anything.

Has anyone come accress similar warnings? I seems internal working of flutter.

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/util/LongArray;->get(I)J

Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J at android.os.StrictMode.lambda$static$1(StrictMode.java:407)

Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J at android.os.StrictMode.lambda$static$1(StrictMode.java:428)

: Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; at android.os.StrictMode.lambda$static$1(StrictMode.java:407)

Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; at android.os.StrictMode.lambda$static$1(StrictMode.java:428)

Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J at android.os.StrictMode.lambda$static$1(StrictMode.java:407)

Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J at android.os.StrictMode.lambda$static$1(StrictMode.java:428)

Cioffi answered 29/5, 2020 at 22:58 Comment(3)
Same as you. Found anything ?Lorrettalorri
have you got the answer? I have been facing this issueHarness
I'm facing the same issue. I don't know what it is or how to solve it.Hospitable
W
15

I known the question is quite old, but answering anyway There is a closed issue on the flutter github that seems to correspond to your stack trace : https://github.com/flutter/flutter/issues/36915#issuecomment-525668810 The pined comment explain what happen : Call to SDK API using ReflectionAccessors Class which is discouraged by google as mentionned in https://developer.android.com/guide/app-compatibility/restrictions-non-sdk-interfaces As explained in the github thread, it is safe to ignore those warning because the reflexion calls are protected and fail silently. Hopes this helps

Wallasey answered 29/3, 2021 at 17:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.