Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Java binding with provided/unprovided package

ChristianSchmidChristianSchmid CHMember ✭✭
edited May 2019 in Xamarin.Android

We have Java SDK that is delivered in 2 packages.
1) the SDK-provided contains all classes and methods for generating the binding.
2) the SDK is deployed and loaded at runtime on the device.

We have set up 2 VS projects
A ) The Android App that uses the SDK. References B
B ) A binding project with SDK-provided as InputJar and SDK as EmbeddedJar (there is a small API in it for loading the SDK at runtime). All the dependencies (jar) have EmbeddedReferceJar build action.

We are able to deploy/load and run the SDK (2) if we exclude the SDK-provided and replace it with a simple Binding done by hand.

We are not able to use the full binding provided by (1), because the SDK-provided classes are added to the classes.dex and thus to the apk and at runtime they hide the classes from (2)

Why is the SDK-provided embedded into the app, if we set the action to InputJar?????

We see that the SDK-provided jar is required to compile the Java classes generated by ACW.

What we need is someting like:

  • Add SDK-provided to the Javac Build Task
  • Add SDK-provided to the Proguard Build Task
  • Remove SDK-provided from the CompileToDalvik (Dx) Build Task

Any idea on how to achieve this or for alternative approaches is highly appreciated!

Sign In or Register to comment.