Add a jar file to my Xamarin project

£可爱£侵袭症+ 提交于 2019-12-12 16:08:36

问题


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


回答1:


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!



来源:https://stackoverflow.com/questions/24301216/add-a-jar-file-to-my-xamarin-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!