Search code examples
bindingjarxamarinembedded-resourceresolve

Add a jar file to my Xamarin project


I am wanting to add the "universal-image-loader jar" file to my Xamarin project and am not sure what I need to do. I have had a look at this resource but would still like some help please: itexico.com/blog/bid/100447/Android-Wear-Developer-Preview-Using-Xamarin-Jar-Binding

Here is what I have done so far:

  1. Downloaded https://github.com/nostra13/Android-Universal-Image-Loader
  2. Created a folder called "Jars" in the root folder of my Xamarin project
  3. I have added the "universal-image-loader-1.9.2-with-sources.jar" file to the "Jars" folder
  4. I have set the build action to "embedded resource" for the "universal-image-loader-1.9.2-with-sources.jar" file
  5. I have successfully build the project

I still cannot use the ImageLoaderobject in my application. I cannot resolve a ImageLoaderobject and am not sure what else I need to do.

May I please have some help?

Thanks in advance


Solution

  • I'd suggest you use Java Bindings Library for that. What you need to do is to add a project to your solution of type "Android Java Bindings Library" you DON'T need to create Jars folder it is created in the new project by itself. Add your jars there. On your startup project click on references and add the java binding project you have just created as a reference. build it and try accessing your assembly either by adding it in the using section or by it's fully qualified name.

    Good luck!