VS2015 Update2 Build Android Program Problem Summary _ Practical Tips

Source: Internet
Author: User
Tags zip

Since VS2015, Visual Studio has begun to build support for cross-platform development, and the Visual Studio Team has released an additional compilation toolset clang with Microsoft CodeGen to facilitate development of cross-platform code for Developers, The clang version number used by the Toolset at VS 2015 Update 2 o'clock is 3.7. At the same time, VS's mobile development capabilities are no longer limited to Windows Phone, but support the application development of mainstream platforms, including Android and iOS. and other new features are introduced for the first time, although after two times update, there are still some ' bugs ', this article on the construction process encountered some problems to make a summary, not regularly updated.

1. Although the installation of the Visual C + + Android Development can be checked, but the visual Studio 2015 with Update 2 of the offline installation package ISO does not fully include the Android SDK, Android NDK, A Pache Ant and other kits, so need to download online, but limited to the domestic network environment, after the installation is completed you will likely receive a warning of download failure, if so you have to download the installation package and manually configure, otherwise you will encounter such as argument ' Sdklocation ' is null or empty; Aapt.exe could is not found error at '. '.

This provides some of the domestic mirror addresses used by the author:

http://ubuntu.buct.edu.cn/android/repository/
http://mirrors.neusoft.edu.cn/android/repository/
http://mirrors.hust.edu.cn/apache/ant/binaries/

In addition to the Android SDK manual installation steps slightly complex (must include the Android SDK Tools, Platform-tools and Build-tools, etc.), the other basic is a zip directly unzip the line. Finally need to configure the address in the Vs2015->tools->options->cross platform, specifically look at the picture:

2. If the installation of the card in Java, Android wait for a long time, can not worry cancel, with the taskbar manager to end secondary installer related processes, and then the installation can continue without affecting the installation of other components, Then install the related components you need separately.

Here, when the author installs VS2015 in Microsoft Visual Studio Emulator for Android, it is recommended that you skip this module and download the installation package installation of the simulator separately, if you install the simulator to the last failure rollback, Check to see if your computer is powered on or supports Hyper-V features, such as Win8 Home Edition.

3. The above steps can be basically done with the Android program, but if you use C + + to develop native-activity application, you may get the following similar error in Build:

trk0005:failed to locate: "Clang.exe". The system cannot find the file specified
Tracker:trk0005:δҵ: Clang.exeϵͳҳָļ

These problems are due to the fact that the NDK you installed did not come with the appropriate clang version, and note that VS2015 with Update 2 only has built-in support for Clang 3.6 If you do not want to configure the tool platform, It is recommended that you download Android-ndk-r10e-windows-x86.zip This version of the NDK directly, because android-ndk-r10e before and after Android-ndk-r11 version of the built-in clang are not 3.6 version of the . And then there's the detail, if you're downloading Android-ndk-r10e-windows-x86_64.zip, then you need to put the \android-ndk-r10e\toolchains\llvm-3.6\prebuilt\ Windows-x86_64 changed its name to \android-ndk-r10e\toolchains\llvm-3.6\prebuilt\windows.

4. If you use Microsoft Visual Studio Emulator for Android and you choose to configure the network for the emulator, you may experience the following error:

XDE Exit Code:unknown ( -532462766)
unhandled exception. Exception Info:System.Management.ManagementException

The above error is reflected from the log file in which the emulator failed to start, because the virtual switch of Hyper-V is not configured, and the Hyper-V manager->virtual switch manger is turned on ... You will most likely receive the following tips

An error occurred while trying to retrieve a list of virtual switches

As to what this error is, the solution is to completely remove Microsoft Visual Studio Emulator for Android and Hyper-V, reboot, install Hyper-V (note all check), reboot, and install the emulator (reboot?) , this time can start the simulator normally, because the installation of Windows features basic need to restart to complete, so don't bother to jump too heavy!

The next step is to use the VS2015 with the simulator for debugging, but the problem is not finished. You may encounter "could not locate" the Android Debug Bridge (Adb.exe) when you deploy. "And then the VS device List suddenly becomes" no Available Devices "

It seems to be unable to find Adb.exe, it appears that only in the VS configuration of the Android SDK path is not enough, search, find the following scenarios and successfully resolved:
Open the Registry Manager, locate Hkey_local_machine\software\wow6432node\android SDK tools, modify the path value for your SDK path, and if not, create a new key to the Android SDK tools, Then add a string value named Path (string value)

Note that the reason for no available devices may also be the start order problem for Adb.exe and VS, which is also present in eclipse.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.