我是 Xamarin 的新手,即使在较小的事情上仍然很努力。 :)
已开发可在 iOS 和 Android 中运行的 Xamarin.Forms 应用。
我添加了Android定位服务的代码。 为此,请点击以下链接: 1. http://developer.xamarin.com/guides/android/platform_features/maps_and_location/location/ 2. https://blog.xamarin.com/introducing-the-google-play-services-component-for-xamarin-android/
但是,发现了很多错误,因为我使用 Android SDK 管理器添加的 google play 服务是最新的。 在为如何使用 SDK 管理器或命令行获取旧版本以及在何处获取旧版本绞尽脑汁几个小时后,发现 Xamarin 确实在 xamarin 商店提供组件,该商店具有 Google Play Services 组件。我将它的 22.0.0 版本添加到项目的组件文件夹中。
在那之后,我所有与 google play 服务相关的错误都消失了,但开始出现以下错误:
Cannot copy System.Diagnostics.Tools.dll to /bin/Debug/System.Diagnostics.Tools.dll, as the source file doesn't exist.
(为了便于阅读,我截断了dll路径)
我的问题是:
- 如何解决 dll 问题?
- 无论我采取什么措施来修复 Google Play 服务,它们是否足够好?还是我需要在 IDE 中多加注意?
- 添加 Google play 服务是否与 DLL 问题有关?
最佳答案
- 我重新启动了 xamarin studio,它为我修复了 DLL 问题。
- 按照上述步骤将 Google Play 服务添加到项目中。添加 Google Play 服务与 DLL 问题无关。因此,继续面对其他问题;)
关于c# - Xamarin Studio : Cannot copy System. Diagnostics.Tools.dll,因为源文件不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32091858/