Article directory
Part.I Introduction
Because I want to try the development of the mobile terminal, I simply searched the languages that can be used for mobile terminal development on the Internet, and found that Java, C#, etc. are all available. Although most of them use Java, the author is more familiar with C#, so I started to develop Android based on C# on a whim!
Chap.I environment construction
It's very simple, create a new project in Vistual sudio, look for C#/Andriod, generally can't find it, indicating that you haven't installed it Xamarin
, and then there will be "Install multiple tools or functions" in blue font below, click to check "Use .NET Mobile Development", and then modify it for installation.
Enable Hyper-V acceleration, if you don't enable this, debugging is super slow.
- Type "Windows features" in the Windows Search box, and then select "Turn Windows features on or off" in the search results. In the Windows Features dialog box, enable Hyper-V and Windows Hypervisor Platform:
and restart the computer.
Part.II Example
Here's a simple example:
Create a new C# Android project
Expand the solution → Resources
→ layout
, double-click content_main.xml
, and then you can add controls on it to show your talents!
Then set the debugging to Debug
mode, click the green triangle to run. At the beginning, you need to configure a virtual environment, just follow the prompts, the following is a screenshot of mine (it seems to need keXue ShangWang).
The following is the author's running results: