Will Google Android ever support .NET?

126,163

Solution 1

Update: Since I wrote this answer two years ago, we productized Mono to run on Android. The work included a few steps: porting Mono to Android, integrating it with Visual Studio, building plugins for MonoDevelop on Mac and Windows and exposing the Java Android APIs to .NET languages. This is now available at http://monodroid.net

Mono on Android is based on the Mono 2.10 runtime, and defaults to 4.0 profile with the C# 4.0 compiler and uses Mono's new SGen garbage collection engine, as well as our new distributed garbage collection system that performs GC across Java and Mono.


The links below reflect Mono on Android as of January of 2009, I have kept them for historical context

Mono now works on Android thanks to the work of Koushik Dutta and Marc Crichton.

You can see a video of it running here: http://www.koushikdutta.com/2009/01/mono-on-android-with-gratuitous-shaky.html

And you can get the instructions to build Mono yourself here: http://www.koushikdutta.com/2009/01/building-mono-for-android.html

You can get a benchmark comparing Mono's JIT vs Dalvik's interpreter here: http://www.koushikdutta.com/2009/01/dalvik-vs-mono.html

And of course, you can get a pre-configured image with Mono here (go to the bottom of the post for details on using that): http://www.koushikdutta.com/2009/01/building-mono-for-android.html

Solution 2

Yes, it will be possible and it won't be that difficult. All what's needed at this point to start with is some kind of converter that will turn MSIL into Dalvik bytecode. Since both formats are open-sourced and well documented, there won't be any problem with it.

So, writing Android applications in C# or VB.NET will be possible, question is how much of .NET framework standard libraries will be supported. But that's another issue.

Oscar Reyes wrote:

I'm pretty sure if google hand ANY interest in .net, they would've design something while Android was in the first stages, not now when they are in production stages. I don't mean it is not possible, what I'm saying is they're not interested. Maybe in mmm hhhh 10 yrs.

Actually what they've already designed is very compatible with Java and .NET

They can't do everything at once, but if you look into Android SDK, there is a tool called dx. This tool converts Java bytecode into Dalvik bytecode, so in other words, you can run programs written in Java on Android with no effort today. Now the same tool is needed for .NET.

Considering how similar .NET and Java are, it's really a matter of time.

ddimitrov wrote:

The .Net->Java->Dalvik translation can be done even now (http://dev.mainsoft.com/), but I think you underestimate the lack of .Net libraries. Of course somebody can port Mono, but it's definitely a non-trivial effort.

No need to port Mono. Android already has VM and some basic API. All what's needed is CIL->Dalvik converter and tiny .NET wrapper for Android API (and maybe some basic implementation of some standard .NET classes). That's it.

Update: .NET already works on Android - you will need product called Monodroid (http://monodroid.net) as stated above.

Solution 3

Miguel de Icaza's announced on his blog on the 17th of Feb 2010 that they are starting work on mono for android which will be called MonoDroid.

This will be similar to MonoTouch on the iphone but for android instead.

It will provide binding to the android UI, so apps will look and feel live native android apps. This will require you to write an android specific UI.

You will however be able to reuse you existing lower level libraries without the need to recompile.

Solution 4

There is Mono for Android, the .NET framework ported for Android. And there is MonoDroid, a development stack for using C# and the core .NET APIs to develop Android-based applications. MonoDroid Preview 1 has been released a couple of days ago.

Solution 5

Since this is one of the first links on Google when search for Android and .net support, it is only fitting to post this here.

The mono project is working on a SDK to develop Android applications using CIL languages such as C#. The down side is it will be a commercial product. monodroid

Share:
126,163

Related videos on Youtube

JarrettV
Author by

JarrettV

I'm a senior software architect for a healthcare startup in the south.

Updated on January 31, 2020

Comments

  • JarrettV
    JarrettV about 4 years

    Now that the G1 with Google's Android OS is now available (soon), will the android platform ever support .Net?

    • Calanus
      Calanus over 14 years
      Now that would be something!
    • D-Dᴙum
      D-Dᴙum almost 12 years
      surly more importantly, will Microsoft ever port .NET to a platform other than Windows?
  • ddimitrov
    ddimitrov over 15 years
    @akdom, do you have experience with porting of software from desktop/server OS to embedded? I have some mobile development experience (Java and Brew) and IMHO, you are grossly underestimating the effort. It might be possible, but deffinitely not in the next 3 years.
  • akdom
    akdom over 15 years
    @ddmitrov: The question was whether the android platform with EVER support .NET, not whether it will within the next three years. I was merely positing that since Mono is an open source implementation of .NET it would be easier to construct an android version of Mono than to start from scratch.
  • OscarRyz
    OscarRyz over 15 years
    Yes, we never know... perhaps, perhaps... Well make it 4 yrs instead of 10 ... :P
  • Lena Schimmel
    Lena Schimmel over 15 years
    I don't agree. Everything you say IS technically possible, but I think you underestimate the work needed by an order of magnitude. It's always easy to put together a proof-of-concept like a crosscompiled hello word in a few hours. But to setup wrappers for all classes is A LOT of work.
  • Lena Schimmel
    Lena Schimmel over 15 years
    I like that answers. It shows that it is possible, but if you watch that video, it also shows how many problems are still open to solve and how much work is behind all that.
  • Lena Schimmel
    Lena Schimmel over 15 years
    Check out the video that Sirish Kumar has linked to: youtube.com/?v=s8nMpi5-P-I It shows how much work is to be done.
  • OscarRyz
    OscarRyz over 15 years
    Well, I said, not MS nor Google but probably Miguel and here you are ( well I know it wasn't you, but somehow close ) Great links Miguel. Do you think Google would ever support this? I mean they taking the port under their hood? :) If I could I would downvote my own answer :)
  • lubos hasko
    lubos hasko about 15 years
    @Brian, video you've posted is about iPhone not Android.
  • Rich
    Rich over 14 years
    Well, given Google's Java affinity it's not too surprising that they didn't go for .NET with this. Yes, using Mono might be feasible but I'm almost sure Google would avoid using .NET with similar zeal as Microsoft would avoid using Linux.
  • Matti
    Matti over 14 years
    "small companies aren't going to bet their future on it unless some bigger ones put some weight behind it." Novell already sponsors it. And Microsoft supports the derivative project Moonlight both by providing codecs and test suites.
  • sandos
    sandos about 14 years
    Uhm, thats "only" running in debian running on the same hardware. Not quite ported to "android" in my opinion, but sounds like its not a big problem to port it completely it seems.
  • trampster
    trampster about 14 years
    no it wouldn't your are assuming that win forms would be ported, which is a really bad idea, MonoDroid will have bindings to the android UI widgets, so it will look exactly like a native android app, the user need not even know it is running on MonoDroid
  • trampster
    trampster about 14 years
    Also a CLI Bytecode to Dalvik is a bad idea, the mono runtime and VM already work on ARM, making it run on android will not be a problem. And seeing as mono is JIT compiled and Dalvik is interpreted. Running on the mono runtime will be much faster.
  • trampster
    trampster about 14 years
    Have you used the compact framework? I do every day at my work and a mono port in the form of MonoDroid will be heaps better.
  • cariseldon
    cariseldon almost 14 years
    I'm wondering, has there been any talk with Google to make this easier to install? Perhaps put it up as a free download from the Market? Allow .Net apps to be put on the market?
  • Damian
    Damian over 13 years
    The Monodroid beta is now available to people that signed up for the beta program early.
  • trampster
    trampster over 13 years
    yes it is currently in private beta, which I did sign up for but so far have missed out on an invitation :(
  • abatishchev
    abatishchev over 13 years
    How a bout an article like mono-project.com/Android ?
  • user772401
    user772401 over 13 years
    "All what's needed [...] is some kind of converter that will turn MSIL into Dalvik bytecode" - I lol'd. :)
  • jpierson
    jpierson about 13 years
    I thought there was already a converter for IL to java byte code. If this is the case and dx can convert java byte code to Dalvik bytecode then according to your statement about just needing a converter, this should already be technically feasible. .NET apps would just have to be compiled to java bytecode and then handed to Android as a java application to be converted by dx. Surely it cannot be this simple.
  • Justin
    Justin almost 13 years
    It did not take three years in the end. And the folks at Xamarin plan to do it again in less than six months.
  • gkr
    gkr almost 13 years
    Too bad it doesn't work with Visual Studio Express...
  • Nate Cook3
    Nate Cook3 over 12 years
    Awesome. Glad to se an updated answer. +1 Miguel
  • Govind Malviya
    Govind Malviya over 12 years
    Thanks for this update, I have been following this answer since 2010
  • Karan
    Karan about 12 years
    But MonoDevelop is license based SDK and cannot be used with VS express.. Is there any free SDK based on .NET ??