Xamarin android import library

android xamarin

189 просмотра

3 ответа

21 Репутация автора

In java can add:

import com.runjva.sourceforge.jsocks.protocol.ProxyServer;
import com.runjva.sourceforge.jsocks.server.ServerAuthenticatorNone;

but how I can do it in my xamarin android app?

Автор: Pepe Источник Размещён: 18.07.2016 07:33

Ответы (3)

0 плюса

8040 Репутация автора

You can use a Java Bindings Library to use any AAR or JAR file in Xamarin for Android. Note that, due to some differences between C# and Java, it's possible that you'll have to do a little bit of manual mapping (there's an XML format provided for that). Using this, the compiler will take care of all the JNI bindings and other "plumbing" for you; it'll even convert naming conventions (e.g. prefix interface names with "I").

Автор: EJoshuaS - Reinstate Monica Размещён: 18.07.2016 06:40

0 плюса

1 Репутация автора

Are you using xamarin in visual studio ? if yes then you can simply go to tools and then nuget package manager and install packages.More over you can also search packages on nuget.org its the best site

Автор: Danish Nazir Размещён: 22.07.2016 06:46

0 плюса

154 Репутация автора

First thing, check nuget if what you look is already there.

If it is not there, use this VS extension: https://github.com/EgorBo/Xamarin.GradleBindings

Download the extension from here:


Then after adding the extension to Visual Studio, right click on your reference and then you will see

Add Dependency via gradle

  1. Put the dependency id.
  2. Choose the dependencies you need and download them.
  3. DONT FORGET to put the dependency into your Jar folder (because you might the produced member in your reference dll).
  4. You might need to fix the problems by adding some lines in the metadata.xml*.
  5. If you still don't get any members, you can extract the classes.jar file from the .aar file then rename it to the package file and follow the .jar binding instructions:


*Refer to binding troubleshooting to fix any issue you face (most of the binding needs that step of fixing the metadata.xml): https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/troubleshooting-bindings/ )

Автор: Yaser Al-Najjar Размещён: 05.06.2017 12:36
Вопросы из категории :