[Bug] When using out array parameter in AIDL, the code generator is not working properly #4717
Labels
Area: Bindings
Issues in Java Library Binding projects.
bug
Component does not function as intended.
Milestone
I*m using Android Studio to buld an Android service and VisualStudio 2019 to build an App that uses this Service (have to do it this way).
There seems to be an issue when using
out
arrays likeint[]
orbyte[]
.Steps to Reproduce
int GetByte(out byte[] myByte);
myByte
GetByte
.Expected Behavior
The App shoud receive the byte correctly.
Actual Behavior
It always results in an Exception:
To me it looks like the code generator has a bug. I compared the generated Java code (Android Studio) and the corresponding C# code (Visual Studio):
Java:
C#
The corresponding
_data.writeInt
beforeremote.Transact
seems to be missing for the C# code. Thus the error java.lang.RuntimeException: bad array lengths makes sense to me.Version Information
Xamarin 16.5.000.533 (d16-5@9152e1b)
Visual Studio-Erweiterung, um Entwicklung für Xamarin.iOS und Xamarin.Android zu ermöglichen.
Xamarin.Android SDK 10.2.0.100 (d16-5/988c811)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: c0c5c78
Java.Interop: xamarin/java.interop/d16-5@fc18c54
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-5@9f4ed4b
Log File
java.lang.ArrayIndexOutOfBoundsException: byte[] offset=0 length=1 dst.length=0
The text was updated successfully, but these errors were encountered: