您如何在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模块
发布评论