Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 406
user3736648 Avatar asked Jun 19 '14 07:06

user3736648


People also ask

How use xamarin form Android library?

Xamarin. Android offers two ways to use these libraries: Create a Bindings Library that automatically wraps the library with C# wrappers so you can invoke Java code via C# calls. Use the Java Native Interface (JNI) to invoke calls in Java library code directly.


1 Answers

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!

like image 117
Alex.F Avatar answered Sep 22 '22 00:09

Alex.F