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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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