Search Issue Tracker
Fixed in 2022.1.X
Votes
0
Found in
2019.4
2020.3
2020.3.13f1
2021.1
2021.2
2022.1
Issue ID
1351809
Regression
No
AndroidJavaProxy fails to proxy "java9.util.function.BiConsumer" class when special types are passed as arguments
AndroidJavaProxy fails to proxy "java9.util.function.BiConsumer" when special types - String, Boolean, etc. are passed as arguments
Reproduction steps:
1. Unzip file "bug-repro-project.zip", go to UnityProject folder and open the project inside
2. Build and run on Android device
3. Start logcat
4. Open the application and click on the color change buttons
Expected result: CSharpBiConsumer class with AndroidJavaProxy implemented from java9.util.function.BiConsumer accepts special types (String, Boolean, etc.) as of AndroidJavaObject result, AndroidJavaObject throwable parameters
Actual result: CSharpBiConsumer class with AndroidJavaProxy implemented from java9.util.function.BiConsumer fails to accept special types (String, Boolean, etc.) as of AndroidJavaObject result, AndroidJavaObject throwable java9.util.function.BiConsumer parameters
Reproducible with: 2019.4.30f1, 2020.3.19f1, 2021.1.23f1, 2021.2.0b13, 2022.1.0a11
Tested with:
VLNQA00332, Samsung Galaxy XCover4 (SM-G390F), Android 9, CPU: Exynos 7 Quad 7570, GPU: Mali-T720
VLNQA00004, Meizu MX5 (MX5), Android 5.0.1, CPU: MediaTek Helio X10 MT6795T, GPU: PowerVR Rogue G6200
VLNQA00099, Google Pixel XL (Pixel XL), Android 10, CPU: Snapdragon 821 MSM8996 Pro, GPU: Adreno (TM) 530
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
- [URP] All materials render black when building via batchmode or without rendering Scene/Game view in Editor if Decal renderer Technique is set to "Automatic"
- Player Tags list shows extra blank space behind the scrollbar in the "Player Tags" settings window
- Edit Angular Limits gizmo handles are small and easy to miss-click in the Scene view
- Duplicate Player Tag save fails silently with no error or validation message
- Letters on the left side move further as Letter Spacing is increased when Advanced Text Generator is used and Alignment is set to Center
Resolution Note (fix version 2022.1):
Two things here:
1. The repro project is invalid. It fails to find java9.util.function.BiConsumer and number '9' is removed from class name then it also fails to find other Java class it uses for testing.
2. In any case it works as expected: AndroidJavaProxy by default searches for C# method with a matching signature. However, you can have a full control by overriding this method: https://docs.unity3d.com/2021.2/Documentation/ScriptReference/AndroidJavaProxy.Invoke.html