Reputation: 1
I want to use Baidu Map Android SDK in my monodroid project.This SDK download url is
http://developer.baidu.com/map/static/doc/BaiduMap_AndroidSDK_v2.1.0_All.zip
I followed the instructions described in Xamarin docs, created a binding project, followed these steps in docs, when built binding project i got the messages:
1>------ 已启动全部重新生成: 项目: JuHuiBao.Binding, 配置: Debug Any CPU ------
1>BINDINGSGENERATOR : warning BG8C00: For type System.Byte, base interface System.IComparable`1<System.Byte> does not exist.
1>BINDINGSGENERATOR : warning BG8400: unexpected field type com.baidu.location.BDLocation.a
1>BINDINGSGENERATOR : warning BG8400: unexpected field type com.baidu.location.i
1>BINDINGSGENERATOR : warning BG8102: Class Com.Baidu.Mapapi.Map.Overlay has unknown base type com.baidu.platform.comapi.map.y
1>BINDINGSGENERATOR : warning BG8103: Class Com.Baidu.Mapapi.Map.GraphicsOverlay has invalid base type com.baidu.mapapi.map.Overlay
1>BINDINGSGENERATOR : warning BG8103: Class Com.Baidu.Mapapi.Map.ItemizedOverlay has invalid base type com.baidu.mapapi.map.Overlay
1>BINDINGSGENERATOR : warning BG8701: Invalid return type java.util.List<com.baidu.mapapi.map.Overlay>
1>BINDINGSGENERATOR : warning BG8103: Class Com.Baidu.Mapapi.Map.MyLocationOverlay has invalid base type com.baidu.mapapi.map.Overlay
1>BINDINGSGENERATOR : warning BG8103: Class Com.Baidu.Mapapi.Map.PoiOverlay has invalid base type com.baidu.mapapi.map.Overlay
1>BINDINGSGENERATOR : warning BG8103: Class Com.Baidu.Mapapi.Map.PopupOverlay has invalid base type com.baidu.mapapi.map.Overlay
1>BINDINGSGENERATOR : warning BG8103: Class Com.Baidu.Mapapi.Map.RouteOverlay has invalid base type com.baidu.mapapi.map.ItemizedOverlay
1>BINDINGSGENERATOR : warning BG8103: Class Com.Baidu.Mapapi.Map.TransitOverlay has invalid base type com.baidu.mapapi.map.ItemizedOverlay
1>BINDINGSGENERATOR : warning BG8C00: For type Com.Baidu.Mapapi.Search.PlaceCaterActivity, base interface com.baidu.mapapi.search.a.a does not exist.
1>BINDINGSGENERATOR : warning BG8102: Class Com.Baidu.Platform.Comapi.Map.A has unknown base type com.baidu.platform.comapi.map.i
1>BINDINGSGENERATOR : warning BG8102: Class Com.Baidu.Platform.Comapi.Map.B has unknown base type com.baidu.platform.comapi.map.i
1>BINDINGSGENERATOR : warning BG8102: Class Com.Baidu.Platform.Comapi.Map.C has unknown base type com.baidu.platform.comapi.map.i
1>BINDINGSGENERATOR : warning BG8102: Class Com.Baidu.Platform.Comapi.Map.D has unknown base type com.baidu.platform.comapi.map.i
1>BINDINGSGENERATOR : warning BG8102: Class Com.Baidu.Platform.Comapi.Map.F has unknown base type com.baidu.platform.comapi.map.i
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type com.baidu.platform.comapi.map.z
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type com.baidu.platform.comapi.map.u
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type com.baidu.platform.comapi.map.w
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type com.baidu.platform.comapi.map.w
1>BINDINGSGENERATOR : warning BG8700: Unknown return type com.baidu.platform.comjni.map.basemap.a
1>BINDINGSGENERATOR : warning BG8700: Unknown return type com.baidu.platform.comapi.map.w
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type com.baidu.platform.comapi.map.u
1>BINDINGSGENERATOR : warning BG8900: Type com.baidu.platform.comjni.permissioncheck.PermissionCheck: FxDG naming violation: Type name 'PermissionCheck' matches namespace part 'Permissioncheck'.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type com.baidu.vi.i
1>BINDINGSGENERATOR : warning BG8C00: For type Com.Baidu.Mapapi.Search.PlaceCaterActivity, base interface com.baidu.mapapi.search.a.a does not exist.
1>BINDINGSGENERATOR : warning BG8900: Type com.baidu.platform.comjni.permissioncheck.PermissionCheck: FxDG naming violation: Type name 'PermissionCheck' matches namespace part 'Permissioncheck'.
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Mapapi.Search.MKSearch.PoiDetailSearch, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.A, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.B, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.C, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.D, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.E, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.F, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.G, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.H, due to a duplicate field, method or nested type name
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Baidu.Platform.Comapi.Map.MapController.I, due to a duplicate field, method or nested type name
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(23,17,23,18): warning CS0628: “Com.Baidu.Location.LocationClientOption.A”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(39,20,39,24): warning CS0628: “Com.Baidu.Location.LocationClientOption.Byte”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(58,18,58,22): warning CS0628: “Com.Baidu.Location.LocationClientOption.Case”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(74,20,74,24): warning CS0628: “Com.Baidu.Location.LocationClientOption.Char”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(93,19,93,21): warning CS0628: “Com.Baidu.Location.LocationClientOption.Do”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(109,18,109,22): warning CS0628: “Com.Baidu.Location.LocationClientOption.Else”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(125,18,125,21): warning CS0628: “Com.Baidu.Location.LocationClientOption.For”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(141,17,141,21): warning CS0628: “Com.Baidu.Location.LocationClientOption.Goto”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(157,18,157,20): warning CS0628: “Com.Baidu.Location.LocationClientOption.If”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(173,17,173,20): warning CS0628: “Com.Baidu.Location.LocationClientOption.Int”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(189,17,189,21): warning CS0628: “Com.Baidu.Location.LocationClientOption.Long”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(205,20,205,23): warning CS0628: “Com.Baidu.Location.LocationClientOption.New”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(224,20,224,23): warning CS0628: “Com.Baidu.Location.LocationClientOption.Try”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Location.LocationClientOption.cs(243,18,243,22): warning CS0628: “Com.Baidu.Location.LocationClientOption.Void”: 在密封类中声明了新的保护成员
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Mapapi.Map.MapView.cs(11,24,11,36): warning CS0108: “Com.Baidu.Mapapi.Map.MapView.LayoutParams”隐藏了继承的成员“Android.Views.ViewGroup.LayoutParams”。如果是有意隐藏,请使用关键字 new。
1>J:\Development\JuHuiBao\JuHuiBao.Binding\obj\Debug\generated\src\Com.Baidu.Mapapi.Map.MapView.cs(784,36,784,55): warning CS0618: “Com.Baidu.Mapapi.Map.MapView.ZoomControls”已过时:“deprecated”
1> JuHuiBao.Binding -> J:\Development\JuHuiBao\JuHuiBao.Binding\bin\Debug\JuHuiBao.Binding.dll
========== 全部重新生成: 成功 1 个,失败 0 个,跳过 0 个 ==========
The built action success with so many warnings, and some class can't be created,the JuHuiBao.Binding.dll
can't work find.
How can i fix this issues?
Upvotes: 0
Views: 1084
Reputation: 684
You will have to edit the Metadata.xml
file. As of right now its very difficult to set up bindings. A newer version of mono for android should be exposing some methods in java
that might fix a few of your issues. The only other thing I can recommend is to follow some of the examples available in the Xamarin samples on github. They have quite a few samples using bindings that may help you figure out how to edit that Metadata.xml
file.
Upvotes: 1