在xamarin项目中使用android模块

编程入门 行业动态 更新时间:2024-10-26 12:21:55
本文介绍了在xamarin项目中使用android模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您如何在android xamarin项目中使用Maven或j-center Repository中的预制模块代码?

How do You use pre-built module codes from Maven or j-center Repositories in an android xamarin project?

更具体地说:

我想将此免费模块用作日期选择器:

I want to use this free module as a date picker :

github/alirezaafkar/SunDatePicker

我已阅读此页面:

developer.xamarin/guides/android/advanced_topics/binding-a-java-library/binding-a-jar/

但是由于此模块不仅是jar文件,所以我认为页面中介绍的方法将无用.

But since this module is not just a jar file , I think the method explained in the page wont be useful.

推荐答案

只需在Android Studio中创建一个.aar库项目,将SunDatePicker添加为gradle依赖项并进行构建.然后创建一个Xamarin.Android绑定项目,将C#包装器放在.aar上.我一直都在做,效果很好.

Just create a .aar library project in Android Studio, add the SunDatePicker as a gradle dependency and build it. Then create a Xamarin.Android binding project to place a C# wrapper on the .aar. I do it all the time, works really well.

感谢SushiHangover.

Thanks to SushiHangover.

更多推荐

在xamarin项目中使用android模块

本文发布于:2023-10-07 10:31:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469147.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   项目   xamarin   android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!