Xamarin 中的 Gradle 依赖项 [英] Gradle dependencies in Xamarin

查看:48
本文介绍了Xamarin 中的 Gradle 依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Xamarin 项目中集成来自 Gradle 的依赖项?

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

A 有一些库,我需要安装它们,它们看起来像这样

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
}

我可以以某种方式将它们暴露给 Xamarin 吗?

Can I expose them to Xamarin somehow?

推荐答案

Xamarin.Android 中没有 gradle.

要获取外部库或 Android 库,您可以使用:

To get external libraries or Android libraries you could use:

  1. NuGet

Xamarin 组件

进行自己的 Java 库绑定

将代码直接从 Java 转换为 C#.

Convert code directly from Java to C#.

有一个用于 Visual Studio 的插件(几个月前测试过,但对我不起作用)理论上从 gradle 获取依赖项并尝试将它们转换为 C# 绑定.

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.

这里有一个非常好的 github 页面,其中包含很棒的 Xamarin 插件.

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

这篇关于Xamarin 中的 Gradle 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆