Search Issue Tracker
Won't Fix
Unknown (hidden) 2019.4.X, 2020.3.X, 2022.1.X, 2022.2.X
Votes
29
Found in
2019.4.39f1
2020.3.35f1
2022.1.3f1
2022.2.0a13
Issue ID
UUM-2303
Regression
No
[Android]"StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation" thrown in Google Play when APK is published
1. Open empty Unity project
2. Build Android APK
3. Upload APK to Google Play Developer console
Expected result - No API warnings are thrown
Actual result - API warning is thrown in Google Play developer console:
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)
Reproducible with - 2020.1.0a13, 2019.3.0b9, 2018.4.0f1
Note - See "edit" information if you don't want to create project from scratch to reproduce the issue
-
AlexSD3
Feb 09, 2022 22:32
-
brijesh_w7
Jan 13, 2022 19:53
Hi Unity
Do you have any suggestion or ETA to fix this issue because later on, this may become a major issue
Thanks
-
DaaMonkey
Aug 03, 2021 10:00
Also in 2020.3.8f1
-
Combat-Wombat
May 25, 2021 08:51
Same in 2020.2.6f1
-
MudbuG
Jan 22, 2021 05:07
I have this problem with 2019.4.17f1
-
tainguyenhuu
Jan 17, 2021 14:33
me too...
-
ujn_dev
Nov 17, 2020 17:55
The problem still exists on the latest release 2020.1.13f1
-
ujn_dev
Nov 17, 2020 17:54
The problem still exists on the latest release 2020.1.13f1.
-
jbecana
Sep 24, 2020 20:11
Same here 2019.4.10f1
-
tdarby
Jul 05, 2020 19:48
Seeing this in 2019.4.1f1, as well. Two stack traces from play.google.com follow.
=================================================================
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:407)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredConstructorInternal(Native Method)
at java.lang.Class.getConstructor0(Class.java:2329)
at java.lang.Class.getDeclaredConstructor(Class.java:2170)
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.access$300(Unknown Source:0)
at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:83)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)=================================================================
Stack Trace 2:
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.access$300(Unknown Source:0)
at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:83)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Prefab override popup is cropped/positioned incorrectly when more than one display is used and a higher display Scale is set
- Opening a dropdown on a small screen results in its instant closing when mouse cursor is pressed where the dropdown is going to be opened
- Only "ArgumentNullException: Value cannot be null" is displayed instead of all the actual errors when opening a project with numerous compilation errors
- MultiColumnListView and MultiColumnTreeView do not change selection on first input when focus is set by code
- SerializedProperty.DataEquals is returning false when SerializedProperty.EqualContents return true
Resolution Note:
Issue not reproducible anymore. Google has removed MethodHandles.Lookup() method from their greylist.
Resolution Note (2022.1.X):
This is not a bug, but just a warning in Play store about potential issues in the future. Proper fix requires to use higher JDK version than 8. We don't plan to upgrade JDK in 2022.1.
Resolution Note (2020.3.X):
This is not a bug, but just a warning in Play store about potential issues in the future. Proper fix requires to use higher JDK version than 8. We don't plan to upgrade JDK in 2020LTS.
Resolution Note (2019.4.X):
This is not a bug, but just a warning in Play store about potential issues in the future. Proper fix requires to use higher JDK version than 8. We don't plan to upgrade JDK in 2019LTS.