gpt4 book ai didi

android - 将 AChartEngine 1.0.0 绑定(bind)到 Mono For Android 项目不起作用

转载 作者:行者123 更新时间:2023-11-30 03:53:13 37 4
gpt4 key购买 nike

有没有人能够将 achartengine 1.0 库绑定(bind)到 MonoForAndroid 项目(rel. 4.2.7)并使其工作?

我在我的解决方案中创建了“Java Binding Library”项目,我复制了文件夹 Jars 中的文件 acahrtengine.jar,编辑了文件 Transforms/metadata.xml 添加以下行以规范化命名空间并修复一个错误:

<attr path="/api/package[@name='org.achartengine']" name="managedName">AChartEngine</attr>
<attr path="/api/package[@name='org.achartengine.chart']" name="managedName">AChartEngine.Chart</attr>
<attr path="/api/package[@name='org.achartengine.model']" name="managedName">AChartEngine.Model</attr>
<attr path="/api/package[@name='org.achartengine.renderer']" name="managedName">AChartEngine.Renderer</attr>
<attr path="/api/package[@name='org.achartengine.tools']" name="managedName">AChartEngine.Tools</attr>
<attr path="/api/package[@name='org.achartengine.util']" name="managedName">AChartEngine.Util</attr>

<attr path="/api/package[@name='org.achartengine.tools']/class[@name='Pan']/method[@name='addPanListener']" name="eventName">PanEvent</attr>

它没有错误地遵守并创建了 DLL,但是当我将引用添加到我的项目并尝试重新编译时,出现以下错误

obj\Debug\android\src\mono\org\achartengine\tools\PanListenerImplementor.java(8,25): javac error :  package org.achartengine.tools does not exist
obj\Debug\android\src\mono\org\achartengine\tools\PanListenerImplementor.java(8,25): javac error : org.achartengine.tools.PanListener
obj\Debug\android\src\mono\org\achartengine\tools\PanListenerImplementor.java(8,25): javac error :
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(8,25): javac error : package org.achartengine.tools does not exist
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(8,25): javac error : org.achartengine.tools.ZoomListener
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(8,25): javac error :
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(28,49): javac error : package org.achartengine.tools does not exist
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(28,49): javac error : public void zoomApplied (org.achartengine.tools.ZoomEvent p0)
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(28,49): javac error :
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(33,59): error : package org.achartengine.tools does not exist
obj\Debug\android\src\mono\org\achartengine\tools\ZoomListenerImplementor.java(33,59): error : private native void n_zoomApplied (org.achartengine.tools.ZoomEvent p0);

有什么建议可以让 AChartEngine 在 Mono For Android 上运行吗?谢谢

最佳答案

您需要将 jar 文件添加到您的 Monodroid 项目以及引用绑定(bind)项目。

此过程在此处的帮助文档中进行了描述:

http://docs.xamarin.com/Android/Guides/Advanced_Topics/Java_Integration_Overview/Binding_a_Java_Library_(.jar)#Add_the_Jar_to_the_Project

关于android - 将 AChartEngine 1.0.0 绑定(bind)到 Mono For Android 项目不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13806686/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com