Search Unity

StrictMode policy violation

Discussion in 'Android' started by bpdavis2006, Mar 4, 2020.

  1. bpdavis2006

    bpdavis2006

    Joined:
    Jun 3, 2013
    Posts:
    19
    After attempting to publish an internal test on the Play Store, the testing service presented us with ten warnings that all have to do with StrictMode policy violations. Does anyone have any advice as to how to fix these? It appears from the stack trace that they are internal to the Unity engine.
     
  2. bpdavis2006

    bpdavis2006

    Joined:
    Jun 3, 2013
    Posts:
    19
    Perhaps more information would be helpful. I'm building using 2018.4.18f1 LTS. Certainly I cannot have been the only developer to have had this problem.

    Anyone??? Please???

    10 warnings. All regarding StrictMode policy viloation. One such warning is below.


    Stack trace 1
    StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V
    at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
    at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
    at java.lang.Class.getDeclaredConstructorInternal(Native Method)
    at java.lang.Class.getConstructor0(Class.java:2325)
    at java.lang.Class.getDeclaredConstructor(Class.java:2166)
    at bitter.jnibridge.JNIBridge$a.<init>(Unknown Source:25)
    at bitter.jnibridge.JNIBridge.newInterfaceProxy(Unknown Source:8)
    at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
    at android.os.MessageQueue.next(MessageQueue.java:395)
    at android.os.Looper.loop(Looper.java:160)
    at com.unity3d.player.UnityPlayer$e.run(Unknown Source:32)
     
    Alima-Studios likes this.
  3. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    You are not the only one, and it happens still for the latest 2019.3.6f1. If you google for this you‘ll find another one year old thread discussing this back and forth with no final result. Unity has to do something about it, no chance for you.
     
    Alima-Studios likes this.
  4. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    86
    Same here in 2018.4.17f1
     
    Alima-Studios likes this.
  5. siter01

    siter01

    Joined:
    Nov 15, 2021
    Posts:
    1
    and the problem continues.
     
  6. GaggiGamer

    GaggiGamer

    Joined:
    Aug 10, 2020
    Posts:
    14
    Problem still continues. Unity 2020.1.17f

    and Most of them has something like this written on top of them : "This issue may be associated with Google- supplied library Android WebView. We know about this issue, and we are working on it. There is nothing you need to do at the moment."
     
  7. YousafGrewal

    YousafGrewal

    Joined:
    Jul 5, 2018
    Posts:
    30
    I am having same issue in 2022.3.7f1

    Problem:
    StrictMode StrictMode policy violation: android.os.strictmode.NetworkViolation