We are creating application for android device that works as handy terminal (with barcode reader, RFID reader, LED, 10-key keyboard). The device's maker provide a SDK in the JAR format, to be used with Android Studio for example. I have read this link, but this not applies to JAR files. How I can reference an JAR library in MAUI project? Thank for your time, Antonio
Thank you @Koji, I had already checked some issues (1340,1475,8634).
The correct template is .NET MAUI class library (must be); but the 'Build Action' must be configured inside the project file ".csproj". Although the "Build Action=none" in properties window, inside the project file I added the following lines
<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
<EmbeddedJar Include="classes.jar" />
</ItemGroup>
After build the project, a sketch class ("PlatformClass1") is created automatically for each platform.
After that, it is now possible to create objects with the contents of the 'jar' library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With