Gradle dependencies in Xamarin

Alexey K picture Alexey K · Jun 27, 2016 · Viewed 20.6k times · Source

Is it possible to integrate dependencies from Gradle inside Xamarin project?

A have some libraries, which I need to install, they look like this

dependencies {
compile (name: '<aar fileName>', ext:'aar')
compile 'com.koushikdutta.async:androidasync:2.1.6'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0' compile
}

Can I expose them to Xamarin somehow?

Answer

jzeferino picture jzeferino · Jun 27, 2016

There is no gradle in Xamarin.Android.

To get external libraries or Android libraries you could use:

  1. NuGet

  2. Xamarin Components

  3. Do your own Java Library binding

  4. Convert code directly from Java to C#.

  5. There is a plugin for Visual Studio (tested it a few months ago but didn't worked for me) that in theory grabs dependencies from gradle and tries to convert them to C# Bindings.

Here you have a very good github page with awesome Xamarin Plugins.