我試圖將端口achrtengine庫移植到Xamarin.Droid。將achartengine移植到Xamarin
我所做的是: -
1 - 創建一個新的Android的Java綁定圖書館項目。 2-將添加到Jars文件夾的.jar。 3-設置構建動作EmbededJar
,但得到這個錯誤: - 此行
'Pan': member names cannot be the same as their enclosing type
:
public event EventHandler Pan {
add {
global::Java.Interop.EventHelper.AddEventHandler<global::Org.Achartengine.Tools.IPanListener, global::Org.Achartengine.Tools.IPanListenerImplementor>(
ref weak_implementor_AddPanListener,
__CreateIPanListenerImplementor,
AddPanListener,
__h => __h.Handler += value);
}
remove {
global::Java.Interop.EventHelper.RemoveEventHandler<global::Org.Achartengine.Tools.IPanListener, global::Org.Achartengine.Tools.IPanListenerImplementor>(
ref weak_implementor_AddPanListener,
global::Org.Achartengine.Tools.IPanListenerImplementor.__IsEmpty,
RemovePanListener,
__h => __h.Handler -= value);
}
}
我想這是因爲類名是潘太
// Metadata.xml XPath class reference: path="/api/package[@name='org.achartengine.tools']/class[@name='Pan']"
[global::Android.Runtime.Register ("org/achartengine/tools/Pan", DoNotGenerateAcw=true)]
public partial class Pan : global::Org.Achartengine.Tools.AbstractTool {
更新: -
我插入這條線來解決這個問題
<attr path="/api/package[@name='org.achartengine.tools']/class[@name='Pan']" name="name">PanClass</attr>
更改類的名稱。
,但得到這些錯誤: -
Error CS0019: Operator '==' cannot be applied to operands of type 'AChartEngine.Renderer.XYSeriesRenderer.FillOutsideLine.Type' and 'System.Type' (CS0019) (AChartEngineBindings)
Error CS1503: Argument 2: cannot convert from 'string' to 'System.IntPtr' (CS1503) (AChartEngineBindings)
有誰知道如何解決這個問題?!
任何幫助都很有用。 謝謝。