问题描述
我下载的Visual Studio 2015年preVIEW与Visual Studio的模拟器为Android。
I downloaded "Visual Studio 2015 Preview" with "Visual Studio Emulator for Android".
仿真器工作良好,Apache的科尔多瓦应用程序(可以从文件创建 - >新建 - >项目 - >阿帕奇科尔多瓦空白应用程序)。
Emulator is working good with Apache Cordova App (that can be created from File -> New -> Project -> "Apache Cordova Blank App").
但是,当我尝试调试简单的x86 Android的C ++应用程序(可创建的文件 - >新建 - >项目 - >本地活动应用程序的Android),Visual Studio的Android模拟器成功启动,以及Visual Studio中后,给错误:
But when I try to debug simple x86 android c++ app (that can be created File -> New -> Project -> "Native Activity Application Android"), Visual Studio Android Emulator is launched successfully, and after that Visual Studio give an error:
1>------ Deploy started: Project: Android.Packaging, Configuration: Debug x86 ------
1>Starting emulator...
1>Error installing the package. The device '169.254.191.177:5555' is invalid or not running. Please switch to another device, or use the Android Virtual Device (AVD) Manager to start a compatible emulator, or connect a compatible Android device.
1>The device is invalid or is not running.
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
我检查了:
- 在Android模拟器具有IP地址169.254.191.177 - 我可以看到它在仿真器设置 。
- 在平169.254.191.177 - 工作正常;
- 的telnet 169.254.191.177 5555 - 正太
一些细节:
- 在VS2015中上组合框我选择VS仿真器Android手机(86 - 离线)
- 我在x86架构编译的C ++应用程序
- 在我的Windows 8.1
- 官方AndroidSDK仿真器正常工作与Visual Studio 2015年C ++调试
UPDATE1:adb.exe没有看到VS Android模拟器。为什么 - 这就是问题
Update1: adb.exe doesn't see VS Android emulator. Why - that's the question.
UPDATE2:亚行的设备开始看到VS模拟器后,才命令亚行连接169.254.191.177:5555。为什么默认情况下,亚行没有看到VS模拟器 - 这就是问题
Update2: "adb devices" began to see VS emulator only after command "adb connect 169.254.191.177:5555". Why by default adb don't see VS emulator - that's the question.
推荐答案
你能看到关于亚行开始的错误信息?考虑到它正在科尔多瓦,请尝试重新启动一次,以确保没有一次性的问题。如果还是不行,您可以使用手动连接亚行
Do you see any error message in the beginning regarding ADB? Considering that it is working on cordova, try rebooting once to make sure there is no one-off problems. If that doesn't work, you can manually connect adb using
adb connect <ip>:5555
然后再次尝试该项目。
And then try the project again.
此外,还要确保你拥有所有的pre-必要安装在您的计算机。当你创建一个新的项目,它会打开一个网页,列出了pre-必要条件。
Also, make sure you have all the pre-requisite installed in your machine. When you create a new project, it will open a web page listing the pre-requisites.
这篇关于Visual Studio的2015年Android模拟器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!