Visual studio 2015 无法使用Xamarin在Visual Studio 2015中启动Android emulator

Visual studio 2015 无法使用Xamarin在Visual Studio 2015中启动Android emulator,visual-studio-2015,android-emulator,xamarin.android,Visual Studio 2015,Android Emulator,Xamarin.android,我正在尝试运行教程Android应用程序,在VS2015中使用Xamarin。我把所有东西都用c#编码好了,而且构建得很好。然而,当我在模拟器上运行它时,什么都没有发生。我已经从现有的Nexus5和Nexus6定义中创建了AVD,并添加了Galaxy S7的定义,所有这些都使用API level 21(5.0棒棒糖)。我的应用程序以API级别21(5.0棒棒糖)为目标,将其作为最低要求,并使用5.0(棒棒糖)进行编译 当我开始调试时,emulator屏幕会弹出它的控件,但什么也没发生。有时我会让

我正在尝试运行教程Android应用程序,在VS2015中使用Xamarin。我把所有东西都用c#编码好了,而且构建得很好。然而,当我在模拟器上运行它时,什么都没有发生。我已经从现有的Nexus5和Nexus6定义中创建了AVD,并添加了Galaxy S7的定义,所有这些都使用API level 21(5.0棒棒糖)。我的应用程序以API级别21(5.0棒棒糖)为目标,将其作为最低要求,并使用5.0(棒棒糖)进行编译

当我开始调试时,emulator屏幕会弹出它的控件,但什么也没发生。有时我会让“安卓”文本显示在屏幕中央,但有时它只是一个黑屏。我已经从下面的一些日志文件中复制了输出,但我对Android开发完全陌生,因此不知道还有哪些其他日志/调试信息可用,或者这是否是我的安装、我的应用程序、我的模拟器设置、我的硬件或其他方面的问题

我尝试在VS中调试之前启动模拟器,或者先调试并让它启动模拟器。我让它坐了一个多小时,没有任何变化

我看到了对VT-x和英特尔HAXM的引用,但没有改变任何内容。我的模拟器都是ARM(armeabi/armeabi-v7a)

输出自

Xamarin IDE日志:

Xamarin.VisualStudio.UnhandledExceptionsManager Error: 0 : [2017-02-09 15:31:41.9755] An unhandled error occurred. Details: Error type 2 android.util.AndroidException: Can't connect to activity manager; is the system running? at com.android.commands.am.Am.onRun(Am.java:298) at com.android.internal.os.BaseCommand.run(BaseCommand.java:47) at com.android.commands.am.Am.main(Am.java:99) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249) Mono.AndroidTools.AdbException: Error type 2 android.util.AndroidException: Can't connect to activity manager; is the system running? at com.android.commands.am.Am.onRun(Am.java:298) at com.android.internal.os.BaseCommand.run(BaseCommand.java:47) at com.android.commands.am.Am.main(Am.java:99) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249) at Mono.AndroidTools.AndroidDevice.c__DisplayClass77_0.b__0(Task`1 t) at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() Xamarin.VisualStudio.Devices.DeviceManager Error: 0 : [2017-02-09 15:34:22.9377] System.Runtime.InteropServices.COMException (0x80004005): Project unavailable. at EnvDTE.Project.get_FullName() at Clide.Solution.Adapters.MsBuildAdapter.Adapt(ProjectNode from) at lambda_method(Closure , IAdapter , Object ) at Clide.Patterns.Adapter.AdapterService.Adapt[TSource,TTarget](TSource source) at Clide.Patterns.Adapter.AdapterService.Adaptable`1.As[T]() at Clide.Sdk.Solution.ProjectNode.As[T]() at Clide.Solution.Implementation.UserProjectProperties..ctor(ProjectNode project) at Clide.Sdk.Solution.ProjectNode.get_UserProperties() at Xamarin.VisualStudio.Devices.DeviceManager.GetBestDeviceFor(IProjectNode projectNode, IEnumerable`1 availableDevices) in C:\data\lanes\3513\00fa5cc4\source\xamarinvs\src\Core\VisualStudio.Devices\DeviceManager.cs:line 128 Xamarin.VisualStudio.UnhandledExceptionsManager错误:0:[2017-02-09 15:31:41.9755]发生未处理的错误。详细信息:错误类型2 android.util.AndroidException:无法连接到活动管理器;系统正在运行吗? 位于com.android.commands.am.am.onRun(am.java:298) 位于com.android.internal.os.BaseCommand.run(BaseCommand.java:47) 位于com.android.commands.am.am.main(am.java:99) 位于com.android.internal.os.RuntimeInit.nativeFinishInit(本机方法) 位于com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249) Mono.AndroidTools.AdBeException:错误类型2 android.util.AndroidException:无法连接到活动管理器;系统正在运行吗? 位于com.android.commands.am.am.onRun(am.java:298) 位于com.android.internal.os.BaseCommand.run(BaseCommand.java:47) 位于com.android.commands.am.am.main(am.java:99) 位于com.android.internal.os.RuntimeInit.nativeFinishInit(本机方法) 位于com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249) 在Mono.AndroidTools.AndroidDevice.c___显示类77_0.b__0(任务'1t) 位于System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke() 在System.Threading.Tasks.Task.Execute()中 Xamarin.VisualStudio.Devices.DeviceManager错误:0:[2017-02-09 15:34:22.9377]System.Runtime.InteropServices.COMException(0x80004005):项目不可用。 在EnvDTE.Project.get_FullName()上 位于Clide.Solution.Adapters.MsBuildAdapter.Adapt(ProjectNode from) 在lambda_方法(闭包、IAdapter、对象) 在Clide.Patterns.Adapter.AdapterService.Adapt[TSource,TTarget](TSource-source) at Clide.Patterns.Adapter.AdapterService.adaptive`1.As[T]() 在Clide.Sdk.Solution.ProjectNode.As[T]() 位于Clide.Solution.Implementation.UserProjectProperties..ctor(ProjectNode项目) 在Clide.Sdk.Solution.ProjectNode.get_UserProperties()上 在C:\data\lanes\3513\00fa5cc4\source\xamarinvs\src\Core\VisualStudio.Devices\DeviceManager.GetBestDeviceFor(IProjectNode项目节点,IEnumerable`1可用设备)中 Xamarin单机器人日志:

MonoDroidLog Information: 0 : [2017-02-09 15:35:06.3451] [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory found: Path contains adb in \platform-tools (C:\Program Files (x86)\Android\android-sdk). MonoDroidLog Information: 0 : [2017-02-09 15:35:06.3521] [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory found: Path contains ndk-stack in \. (C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r11c\). MonoDroidLog Information: 0 : [2017-02-09 15:35:06.3601] [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found. MonoDroidLog Information: 0 : [2017-02-09 15:35:06.3751] [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found. MonoDroidLog Information: 0 : [2017-02-09 15:35:06.3942] [I:sdk]: Key HKLM\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found. MonoDroidLog Information: 0 : [2017-02-09 15:35:06.4042] [I:sdk]: Looking for Java 6 SDK.. MonoDroidLog Information: 0 : [2017-02-09 15:35:06.4112] [I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit\CurrentVersion found. MonoDroidLog Information: 0 : [2017-02-09 15:35:06.4192] [I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit\1.6\JavaHome not found. MonoDroidLog Information: 0 : [2017-02-09 15:35:06.4322] [I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit\1.7\JavaHome found: Path contains jarsigner.exe in \bin (C:\Program Files (x86)\Java\jdk1.7.0_55). MonoDroidLog Information: 0 : [2017-02-09 15:35:06.4662] [I:Unknown]: Found Xamarin.Android 7.0.2 MonoDroidLog Information: 0 : [2017-02-09 15:35:06.4772] [I:Unknown]: Found Android SDK. API levels: 21, 22, 23 MonoDroidLog Information: 0 : [2017-02-09 15:35:14.6236] [I:]: Tracking android devices started MonoDroidLog Information: 0 : [2017-02-09 15:35:14.6446] [D:]: Tracking avd started MonoDroidLog Information: 0 : [2017-02-09 15:35:14.6626] [D:]: avd watcher *.ini path: 'C:\Users\Mark\.android\avd' MonoDroidLog Information: 0 : [2017-02-09 15:35:14.6746] [D:]: TrackDeviceTask got: MonoDroidLog Information: 0 : [2017-02-09 15:35:14.6846] [I:]: Got new device list from adb with 0 devices MonoDroidLog Information: 0 : [2017-02-09 15:35:14.6956] [D:]: avd watcher android path: 'C:\PROGRA~2\Android\ANDROI~1\tools\android.BAT' MonoDroidLog Information: 0 : [2017-02-09 15:35:16.8547] [D:]: avd watcher: got device list from avd with 2 devices MonoDroidLog Information: 0 : [2017-02-09 15:36:08.1347] [D:]: TrackDeviceTask got: emulator-5554 offline MonoDroidLog Information: 0 : [2017-02-09 15:36:08.1457] [I:]: Got new device list from adb with 1 devices MonoDroidLog Information: 0 : [2017-02-09 15:36:27.8368] [D:]: TrackDeviceTask got: emulator-5554 device MonoDroidLog Information: 0 : [2017-02-09 15:36:27.8458] [I:]: Got new device list from adb with 1 devices MonoDroidLog Information: 0 : [2017-02-09 15:36:27.8598] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:36:27.8748] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:36:49.6961] [I:Unknown]: Found Android SDK. API levels: 21, 22, 23 MonoDroidLog Information: 0 : [2017-02-09 15:36:49.7461] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:36:50.7321] [D:RunShellCommand]: emulator-5554 am broadcast -a "mono.android.intent.action.PACKAGE_VERSIONS" -e "packages" "Mono.Android.DebugRuntime,Mono.Android.Platform.ApiLevel_21,HelloAndroid2.HelloAndroid2" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.PackageVersions" MonoDroidLog Information: 0 : [2017-02-09 15:36:58.2065] [D:RunShellCommand]: emulator-5554 cat /data/system/packages.xml MonoDroidLog Information: 0 : [2017-02-09 15:37:18.2327] [D:RunShellCommand]: emulator-5554 pm install "/data/local/tmp/HelloAndroid2.HelloAndroid2-Signed.apk" MonoDroidLog Information: 0 : [2017-02-09 15:37:23.6120] [D:RunShellCommand]: emulator-5554 rm "/data/local/tmp/HelloAndroid2.HelloAndroid2-Signed.apk" MonoDroidLog Error: 0 : [2017-02-09 15:37:24.1470] [E:]: Deployment failed Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager. Is the system running? at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) at Mono.AndroidTools.AndroidDevice.c__DisplayClass91_0.b__0(Task`1 t) at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() MonoDroidLog Information: 0 : [2017-02-09 15:37:24.8721] [D:RunShellCommand]: emulator-5554 date +%s MonoDroidLog Information: 0 : [2017-02-09 15:37:25.2461] [D:RunShellCommand]: emulator-5554 setprop "debug.mono.extra" "debug=127.0.0.1:8947:8948,timeout=1486676275,loglevel=0,server=y" MonoDroidLog Information: 0 : [2017-02-09 15:37:25.5571] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:37:25.8891] [D:RunShellCommand]: emulator-5554 "echo" "-n" "${EMULATED_STORAGE_SOURCE}" MonoDroidLog Information: 0 : [2017-02-09 15:37:26.0201] [D:RunShellCommand]: emulator-5554 "echo" "-n" "${EMULATED_STORAGE_TARGET}" MonoDroidLog Information: 0 : [2017-02-09 15:37:26.1601] [D:RunShellCommand]: emulator-5554 am broadcast -a "mono.android.intent.action.EXTERNAL_STORAGE_DIRECTORY" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.ExternalStorageDirectory" MonoDroidLog Information: 0 : [2017-02-09 15:37:31.4024] [D:RunShellCommand]: emulator-5554 "echo" "-n" "${EXTERNAL_STORAGE}" MonoDroidLog Information: 0 : [2017-02-09 15:37:31.5895] [D:RunShellCommand]: emulator-5554 am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "HelloAndroid2.HelloAndroid2/md5c35c20f10c18d97cfa5803a7c4a6812a.MainActivity" MonoDroidLog Information: 0 : [2017-02-09 15:37:41.6850] [D:RunShellCommand]: emulator-5554 ps MonoDroidLog Information: 0 : [2017-02-09 15:37:42.2211] [D:RunShellCommand]: emulator-5554 am force-stop HelloAndroid2.HelloAndroid2 MonoDroidLog Information: 0 : [2017-02-09 15:37:42.2461] [D:RunShellCommand]: emulator-5554 setprop "debug.mono.connect" "" MonoDroidLog Information: 0 : [2017-02-09 15:38:43.8396] [D:]: TrackDeviceTask got: MonoDroidLog Information: 0 : [2017-02-09 15:38:43.8556] [I:]: Got new device list from adb with 0 devices MonoDroidLog Information: 0 : [2017-02-09 15:39:05.9028] [D:]: TrackDeviceTask got: emulator-5554 offline MonoDroidLog Information: 0 : [2017-02-09 15:39:05.9149] [I:]: Got new device list from adb with 1 devices MonoDroidLog Information: 0 : [2017-02-09 15:39:24.8799] [D:]: TrackDeviceTask got: emulator-5554 device MonoDroidLog Information: 0 : [2017-02-09 15:39:24.8919] [I:]: Got new device list from adb with 1 devices MonoDroidLog Information: 0 : [2017-02-09 15:39:24.9049] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:39:24.9209] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:39:44.6171] [I:Unknown]: Found Android SDK. API levels: 21, 22, 23 MonoDroidLog Information: 0 : [2017-02-09 15:39:44.6371] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:39:45.2531] [D:RunShellCommand]: emulator-5554 am broadcast -a "mono.android.intent.action.PACKAGE_VERSIONS" -e "packages" "Mono.Android.DebugRuntime,Mono.Android.Platform.ApiLevel_21,HelloAndroid2.HelloAndroid2" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.PackageVersions" MonoDroidLog Information: 0 : [2017-02-09 15:39:53.1496] [D:RunShellCommand]: emulator-5554 cat /data/system/packages.xml MonoDroidLog Information: 0 : [2017-02-09 15:40:10.3725] [D:RunShellCommand]: emulator-5554 pm install "/data/local/tmp/HelloAndroid2.HelloAndroid2-Signed.apk" MonoDroidLog Information: 0 : [2017-02-09 15:40:15.9999] [D:RunShellCommand]: emulator-5554 rm "/data/local/tmp/HelloAndroid2.HelloAndroid2-Signed.apk" MonoDroidLog Error: 0 : [2017-02-09 15:40:16.4479] [E:]: Deployment failed Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager. Is the system running? at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) at Mono.AndroidTools.AndroidDevice.c__DisplayClass91_0.b__0(Task`1 t) at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() MonoDroidLog Information: 0 : [2017-02-09 15:40:16.7279] [D:RunShellCommand]: emulator-5554 date +%s MonoDroidLog Information: 0 : [2017-02-09 15:40:17.1079] [D:RunShellCommand]: emulator-5554 setprop "debug.mono.extra" "debug=127.0.0.1:8949:8950,timeout=1486676447,loglevel=0,server=y" MonoDroidLog Information: 0 : [2017-02-09 15:40:17.4169] [D:RunShellCommand]: emulator-5554 getprop MonoDroidLog Information: 0 : [2017-02-09 15:40:17.8090] [D:RunShellCommand]: emulator-5554 "echo" "-n" "${EMULATED_STORAGE_SOURCE}" MonoDroidLog Information: 0 : [2017-02-09 15:40:18.0240] [D:RunShellCommand]: emulator-5554 "echo" "-n" "${EMULATED_STORAGE_TARGET}" MonoDroidLog Information: 0 : [2017-02-09 15:40:18.1630] [D:RunShellCommand]: emulator-5554 am broadcast -a "mono.android.intent.action.EXTERNAL_STORAGE_DIRECTORY" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.ExternalStorageDirectory" MonoDroidLog Information: 0 : [2017-02-09 15:40:23.6083] [D:RunShellCommand]: emulator-5554 "echo" "-n" "${EXTERNAL_STORAGE}" MonoDroidLog Information: 0 : [2017-02-09 15:40:23.8193] [D:RunShellCommand]: emulator-5554 am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "HelloAndroid2.HelloAndroid2/md5c35c20f10c18d97cfa5803a7c4a6812a.MainActivity" MonoDroidLog Information: 0 : [2017-02-09 15:40:33.7989] [D:RunShellCommand]: emulator-5554 ps MonoDroidLog Information: 0 : [2017-02-09 15:40:34.3339] [D:RunShellCommand]: emulator-5554 am force-stop HelloAndroid2.HelloAndroid2 MonoDroidLog Information: 0 : [2017-02-09 15:40:34.3509] [D:RunShellCommand]: emulator-5554 setprop "debug.mono.connect" "" MonoDroidLog Information: 0 : [2017-02-09 15:42:05.8061] [D:]: TrackDeviceTask got: MonoDroidLog Information: 0 : [2017-02-09 15:42:05.8201] [I:]: Got new device list from adb with 0 devices MonoDroidLog信息:0:[2017-02-09 15:35:06.3451][I:sdk]:Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidDK找到的目录: 路径包含\平台工具(C:\Program Files(x86)\Android\Android sdk)中的adb。 MonoDroidLog信息:0:[2017-02-09 15:35:06.3521][I:sdk]:密钥HKCU\SOFTWARE\Novell\Mono for Android\Android目录找到: 路径包含\中的ndk堆栈。(C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r11c\)。 MonoDroidLog信息:0:[2017-02-09 15:35:06.3601][I:sdk]:找不到HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory键。 MonoDroidLog信息:0:[2017-02-09 15:35:06.3751][I:sdk]:找不到HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory键。 MonoDroidLog信息:0:[2017-02-09 15:35:06.3942][I:sdk]:找不到HKLM\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory键。 MonoDroidLog信息:0:[2017-02-09 15:35:06.4042][I:sdk]:正在寻找Java 6 sdk。。 MonoDroidLog信息:0:[2017-02-09 15:35:06.4112][I:sdk]:找到HKLM\SOFTWARE\JavaSoft\Java开发工具包\CurrentVersion的密钥。 MonoDroidLog信息:0:[2017-02-09 15:35:06.4192][I:sdk]:找不到HKLM\SOFTWARE\JavaSoft\Java开发工具包\1.6\JavaHome密钥。 MonoDroidLog信息:0:[2017-02-09 15:35:06.4322][I:sdk]:密钥HKLM\SOFTWARE\JavaSoft\Java开发工具包\1.7\JavaHome找到: 路径包含\bin(C:\Program Files(x86)\Java\jdk1.7.0\u 55)中的jarsigner.exe。 MonoDroidLog信息:0:[2017-02-09 15:35:06.4662][I:未知]:找到Xamarin.Android 7.0.2 MonoDroidLog信息:0:[2017-02-09 15:35:06.4772][I:未知]:找到Android SDK。空气污染指数:21、22、23 MonoDroidLog信息:0:[2017-02-09 15:35:14.6236][I:]:开始跟踪android设备 MonoDroidLog信息:0:[2017-02-09 15:35:14.6446][D:::]:开始跟踪avd MonoDroidLog信息:0:[2017-02-09 15:35:14.6626][D::avd watcher*.ini路径:“C:\Users\Mark\.android\avd” MonoDroidLog信息:0:[2017-02-09 15:35:14.6746][D:]:TrackDeviceTask获得: MonoDroidLog信息:0:[2017-02-09 15:35:14.6846][I:]:从亚洲开发银行获得了包含0台设备的新设备列表 MonoDroidLog信息:0:[2017-02-09 15:35:14.6956][D:]:avd watcher android pa