1. Xamarin environment preparation and xamarin environment preparation
I. installation environment
1. Install VS2017
2. Install the Xamarin extension package
3. Install NDK
In the toolbar, one is AVD (simulator management) and the other is NDK (Andoid SDK management)
3.1 open the NDK first and set the proxy in Tools \ Options (because it is to be downloaded from Goolge, so you need to set the proxy). Here I am using mirrors.neusoft.edu.cn, and there are many other domestic images on the Internet. Download the corresponding version of the API. If the computer supports Hyper V, you can download Intel X86 Atom during download, and use it faster when creating the simulator later.
4. Create a blank Andorid Application
4.1 AndroidManifest. xml is the program configuration file
Assets are currently unavailable
Resources is a resource-related file.
Drawable is a static resource file such as images and videos.
Layout is a page layout File
Values is a program resource file, such as text and width on the interface.
Resource. Designer. cs program self-maintenance class, provide access to related resources in CS code
5. Configure the simulator and enable AVD.
5.1 AVD Name: simulator Name
If 5.2 CUP/ABI is available, it will be much faster to choose Intel Atom.
6. Select the simulator to start debugging.
Select the simulator in the toolbar. Note that the version must be compatible with the api version set by the app.
Starting debugging VS will start the simulator and deploy the app. Next we can start
The program is also used for breakpoint debugging.
7. UI description. Click the corresponding axml file in layout to open the design view.
Similar to wpf, the toolbox has corresponding controls and can be dragged to the interface (but not long, basically all are handwritten xml)
8. View logs in the simulator
During debugging, the app often exits at a time. In this case, you need to check the corresponding exception Log. In VS, the Device Log window is provided to track the Log information in the simulator. Open the \ Andorid \ device log in the toolbar
The preparation is in sequence and you can start development.