在Mono上将Mono用于android [英] Use Mono for android on with Mono

查看:73
本文介绍了在Mono上将Mono用于android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将MonoDevelop的编译器切换为Mono工具而不是.NET看起来真的很容易-您只需要在IDE的设置下选择一个不同的框架即可.

It looks really easy to switch MonoDevelop's compiler to Mono tools instead of .NET – you just need to pick a different framework under settings of the IDE.

但是,在切换到Mono并通过Mono工具进行项目编译后,适用于Android的Mono似乎不再是可用的框架(即,Android项目中对它的引用变成红色).显然,构建失败并出现了很多错误,例如Android.XXX.YYY不是类或名称空间名称,等等.

However, after switching to Mono and getting the project compiling by Mono tools, Mono for android no longer seems to be an available framework (i.e. the reference to it in the Android project turns red). Obviously, the build fails with tons of errors like Android.XXX.YYY is not a class or namespace name, etc.

是否可以在Windows计算机上为Android安装Mono,以便Mono工具可以使用它,并且可以从在Mono上运行的Monodevelop中使用它?

Is there a way to install Mono for android on a Windows machine so that it is available to Mono tools and usable from Monodevelop running on Mono?

推荐答案

否.适用于Android的Mono使用MSBuild构建系统,并将自定义构建任务和框架安装到MSBuild扩展目录中. Mono的MSBuild(xbuild)实现具有单独的扩展目录.可能可以跨复制目标和扩展,但是您可能会遇到其他问题,因为它完全未经测试.

No. Mono for Android uses the MSBuild build system, and installs custom build tasks and frameworks into the MSBuild extension directories. Mono's implementation of MSBuild (xbuild) has separate extension directories. It might be possible to copy the targets and extensions across but you'd probably run into other issues, as it's completely untested.

通常在Windows上,除非您有充分的理由使用Mono工具链,否则我建议在MonoDevelop中使用MS/.NET工具链.请注意,即使使用.NET进行编译,也可以使用 Run-> Run with ... 菜单使用 run .

In general on Windows I'd recommend using the MS/.NET toolchain in MonoDevelop unless you have a really good reason to use the Mono toolchain. Note that you can run with Mono even if you compile with .NET, using the Run->Run with... menu.

这篇关于在Mono上将Mono用于android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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