Does Xamarin generate Java source code?

Asked

Viewed 150 times

4

I read that with Xamarin it is possible to program in C# for example, and generate a native application Android and IOS.

After programming in C#, does it generate sources in Java? I can after making the first version of the App, abandon C# and continue with Java?

I know this way I would have some pros and cons, but I want to know for more information.

  • I believe that the native is not Java, when referring to native is that it accesses the native Apis of the android operating system that generate the windows, lists and the like. But I can’t say because I don’t know Xamarin.

  • Very good question. I think it generates Java code yes, but probably compiled.. Even if it is not compiled, it must be strange code... Machined?! String s1 = ""; List<Pessoa> lp;

  • 1

    When referring to the native, it is said that it is compiled directly to bytecode to run on the system’s VM (ART, if I do not have memory). It does not generate Java fonts, it generates only the "second step".

  • Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question.

1 answer

2

No, it uses its own infrastructure and only communicates with Java code where there is need for integration with the operating system, if I’m not mistaken they use the IKVM for this.

So you can’t do it in C# and then convert and use Java code.

It is even possible to have some source code converter out there, but the result is bad, so do it in the language you will use, be it C#, Java, Kotlin, C++ or another.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.