简体   繁体   English

Xamarin Forms Maps Android

[英]Xamarin Forms Maps Android

I'm trying to get a simple Map working in Xamarin Forms. 我正在尝试在Xamarin Forms中使用一个简单的Map。 I alread succeeded for WinPhone, but Android is making it very difficult. 我已经为WinPhone取得了成功,但是Android使其变得非常困难。
I've followed this walkthrough for getting an API key etc.. But when I add the NuGet package for Xamarin.Forms.Maps and updated all packages, I get the 5 errors including: 我已经按照此演练获取API密钥等。但是,当我为Xamarin.Forms.Maps添加NuGet程序包并更新所有程序包时,出现5个错误,包括:

Error: error: package android.support.v7.internal.widget.NativeActionModeAwareLayout does not exist

I already tried the solution on this thread (GooglePlayServices downgrade), but that's not working either. 我已经在此线程上尝试了该解决方案(将GooglePlayServices降级了),但这也不起作用。
I suspect it has something to do with faulty updates of the packages, but I don't want to blame the guys responsible for that. 我怀疑这与软件包的错误更新有关,但我不想怪这件事的负责人。

Can anybody point me in the right direction? 有人能指出我正确的方向吗?

That happened to me. 那件事发生在我身上。 My solution was to unload the project, reload it, tried again to download the nugets and the magic was done. 我的解决方案是卸载项目,重新加载它,再次尝试下载nuget,魔术就完成了。 Hope that solves your problem too. 希望也能解决您的问题。

EDIT 08/10/2015 编辑08/10/2015

Try searching this route: C:\\Users\\USER\\AppData\\Local\\Xamarin and see if there is any Android.Suppor.v7 folder, if not, that means xamarin did not downloaded the nuget, sometimes downloading them from xamarin studio solves the problem (it does not always works, but it's worth to give it a try). 尝试搜索以下路径:C:\\ Users \\ USER \\ AppData \\ Local \\ Xamarin,看看是否有任何Android.Suppor.v7文件夹,如果没有,则意味着xamarin没有下载nuget,有时从xamarin Studio下载它们可以解决问题(它并不总是有效,但是值得尝试一下)。

If that does not work, other thing you can try is to go to your solution folder and delete the .package files, that will erase all the nugets, then you open the solution in vs or xs and restore the nugets. 如果那不起作用,您可以尝试的另一件事是转到解决方案文件夹并删除.package文件,这将擦除所有nuget,然后在vs或xs中打开解决方案并还原nuget。

Hope some of this tips helps you. 希望其中一些技巧对您有所帮助。 Cheers 干杯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM