问题描述
我打算在我的一个项目中试用 Xamarin.Android,因此我安装了 Visual Studio 2015 和 Xamarin.Android.然后,我为我打算使用的 Android 版本安装了软件包.
I meant to try out Xamarin.Android for a project of mine, so I installed Visual Studio 2015 and Xamarin.Android. I then installed the packages for the versions of Android I meant to use.
现在,我正在尝试按照 本教程启动 TaskyAndroid.起初,两个项目中的一个被跳过了,我通过在网上喋喋不休地解决了这个问题.现在,如果我在 Debug 中启动它,它会启动模拟器并给我这个错误:
Now, I am trying to fire up TaskyAndroid, following this tutorial. At first, one of the two projects was skipped, which I fixed by babbling around the net. Now, if I start it in Debug, it launches the emulator and gives me this error:
Couldn't connect to logcat, GetProcessId returned: 0
我检查了项目属性,解决方案的两个项目都配置为调试.我禁用了快速部署,并且在 Android 清单中允许 INTERNET
和 ACCESS_COARSE_LOCATION
.模拟器显示空白屏幕.
I checked in the project properties, both projects of the solution are configured for Debug. I have Fast Deployment disabled and I allowed INTERNET
and ACCESS_COARSE_LOCATION
in the Android Manifest.The emulator displays a blank screen.
如果我在 Release 模式下启动它(更改配置后),模拟器显示相同的内容,没有上述错误.
If I start it in Release mode (after changing the configuration), the emulator displays the same thing, without the aforementionned error.
我尝试清理和重建解决方案.取消选择使用共享运行时"并重新安装 Xamarin 也无济于事.我曾尝试查看日志,但未能从中收集任何相关信息.
I have tried cleaning and rebuilding the solution. Deselecting "Use Shared Runtime" and reinstalling Xamarin didn't help either.I have tried hahing a look at the log, but I failed to muster any relevant information from it.
推荐答案
这个线程.请尝试:
- 关闭模拟器,清理解决方案,然后运行解决方案对我有用.或者
- 清理和重建或
- 在项目属性">Android 选项">打包属性"中取消选择使用共享运行时"或
- 重新安装 Xamarin 模拟器
这篇关于Xamarin 示例应用程序不显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!