有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java构建monodroid示例地图应用程序

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

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

mono.安卓.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\安卓\src\mapsandlocationdemo\MapWithOverlayActivity.java   25  28  MapsAndLocationDemo

怎么了


共 (1) 个答案

  1. # 1 楼答案

    您需要在模拟器上安装谷歌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