java - 构建 monodroid 示例 map 应用程序

标签 java android google-maps xamarin.android xamarin

我正在使用从 Xamarin 最新下载的 map 示例应用程序“MapsAndLoactionDemo”,在 Visual Studio 2010 中出现以下编译错误:

Error   10
Activate(java.lang.String,java.lang.String,java.lang.Object,java.lang.Object[]) in mono.android.TypeManager cannot be applied to (java.lang.String,java.lang.String,mapsandlocationdemo.MapWithOverlayActivity,java.lang.Object[])

mono.android.TypeManager.Activate ("MapsAndLocationDemo.MapWithOverlayActivity, MapsAndLocationDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "", this, new java.lang.Object[] {  });
    D:\Projects\Android\MapsAndLocationDemo\MapsAndLocationDemo\obj\Debug\android\src\mapsandlocationdemo\MapWithOverlayActivity.java   25  28  MapsAndLocationDemo

怎么了?

最佳答案

您需要在您的模拟器
上安装google api 你可以关注这个:http://developer.xamarin.com/samples/MapsDemo/

Installing the Google APIs Android SDK add-on
The Google APIs require the "Google APIs" add-on library, which is provided for each API level. You need to download it for the API level you wish to target.

To install the Google APIs Android SDK add-on:

  1. Launch the Android SDK manager: $ANDROID_SDK_PATH/tools/android
  2. Within the Android SDK manager, click Available packages in the left-hand pane.
  3. In the right-hand pane, navigate to the tree view node Third party Add-ons /Google Inc. add-ons (dl-ssl.google.com)
  4. Select the check-box for e.g. "Google APIs by Google Inc., Android API 8, revision 2".
  5. Click the Install Selected button in the lower right corner.
  6. In the "Choose Packages to Install" dialog, select the Accept radio button, then click the Install button.

如果您使用的是 Genymotion 模拟器 INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android

关于java - 构建 monodroid 示例 map 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11295153/

相关文章:

java - 动态创建字段java

java - org.apache.commons.net.ftp.FTPSClient 在列表命令后返回 425

java - Spring Data JPA 如何为实现公共(public)接口(interface)的两个域类创建单个存储库?

java - LibGDX实现可滚动的HexMap

android - JSoup 解析 : get next element

javascript - map 标记未呈现 - Phonegap 中的 Google Maps Javascript API v3

android - 查询大量数据时,第一次游标操作很慢。怎么解决?

android - 在服务器上调用 Web 服务时使用安全性的最佳方式

google-maps - 是否可以使用Google Maps API或Bing Maps API获取地址的邻居?

firebase - 从第二屏返回后 flutter 刷新 map