Question about Xamarin

Hello guys, I am new in this domain and I want to ask you how can I start to make an android app using Xamarin? I had the VS 2013 installed because I used it (we learn the C# at our school) and I understood that for creating android apps I need to install the Visual Studio 2017. I installed it and uninstalled several times because I simply did not understand how can I start the project.
When I select New proect -> Android -> Android App (Xamarin), there is already something written in the project .cs and it contains a lot of errors. And more than that, I don't find the "Main.axml" how I saw on youtube at guys that were making simple apps. Instead of it, I have "activity_main.axml" and "content_main.axml".
Other thing I saw on youtube was that the guys when they clicked New Project and Android, they had a lot of possibilities to choose from, including "Blank App (Android)", and I don't have that. I have only 5 possibilities:

i.imgur.com/B8y6dQG.png

So, can you help me to begin? I want you only to show me how to start the project.. :(
And, one more thing.. As I said earlier, I don't know a lot of Xamarin, but the process of creating apps is the same like the process of creating windows forms? (for instance) I mean at VS 2013 with drag&drop items on the designer tab, with properties of the elements, with events etc?

Answers

  • YorkGoYorkGo CNMember, Xamarin Team Xamurai

    Android emulator/Device

    You need deploy your Xamarin.Android project to an emulator/Device, so please refer to:

    I don't find the "Main.axml" how I saw on youtube at guys that were making simple apps. Instead of it, I have "activity_main.axml" and "content_main.axml".

    Basically in a new project when you will have an Activity, there is an OnCreate() method in this Activity, and you will find a SetContentView() method and a layout as parameter. With this method you can set the graphical user interface, in your example the activity_main.axml, you could rename it to Main.axml, the only difference between them is their name. :)

    I saw on youtube was that the guys when they clicked New Project and Android, they had a lot of possibilities to choose from, including "Blank App (Android)", and I don't have that. I have only 5 possibilities.

    I think that's enough for your get started with Xamarin.Android. But if you insist, you could install the Xamarin.Android template to implement this feature, click Visual Studio Tools --> Extensions and updates:

    So, can you help me to begin? I want you only to show me how to start the project..

    First, start an android emulator or connect your android device to computer, VS will automatically detect the available Android device. Then, build your project, when it build sucess, deploy your project to the device:

    but the process of creating apps is the same like the process of creating windows forms? (for instance) I mean at VS 2013 with drag&drop items on the designer tab, with properties of the elements, with events etc?

    No drag and drop design in Xamarin. There are a lot of threads related to this. Do a search.

  • darius01darius01 Member
    edited February 1

    @YorkGo said:

    Android emulator/Device

    Then, build your project, when it build sucess, deploy your project to the device:

    Thank you. I followed your steps, but I still get an error when I try to open the main.axml

    i.imgur.com/1TOaY9L.png

    " This project contains resources that were not compiled successfully, rendering might be affected "

  • YorkGoYorkGo CNMember, Xamarin Team Xamurai

    Sorry for my late responding, the error means u need to install the missing nuget package for you project.

Sign In or Register to comment.