Android的 - 添加外部库项目 [英] Android - Adding external library to project

查看:131
本文介绍了Android的 - 添加外部库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多的麻烦添加WEKA库项目我的工作。我跟几个教程解释如何做到这一点,包括Android开发者指南:

I am having a lot of trouble adding the WEKA library to a project I am working on. I have followed several tutorials that explain how to do this including the Android Developers guide:

<一个href="http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary">http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary

和几个贴子对左右。

我已经在我的项目与weka.jar文件中创建一个文件夹,创建一个新的图书馆(添加weka.jar文件库),并列入该库在我的构建路径。我也曾在项目属性添加库中的排序和导出选项卡下。

I have created a folder in my project with the weka.jar file, created a new library (adding the weka.jar file to the library) and included this library in my build path. I have also added the library under the "Order and Export" tab in the project properties.

我也试图导入的jar文件,使罐子的实际内容被提取到一个目录在我的项目。

I have also tried importing the jar file so that the actual contents of the jar are extracted into a directory in my project.

这一切的最终结果是,我的项目是能够正确无误建立,但是当谈到时间,在模拟器上我得到下面的异常运行我的code:

The end result of all of this is that my project is able to build correctly and without error, but when it comes time to run my code on the emulator I get the following exception:

04-10 22:52:21.051:ERROR / dalvikvm(582):找不到类的weka.classifiers.trees.J48,从法edu.usc.student.composure.classifier.GaitClassifierImpl引用

04-10 22:52:21.051: ERROR/dalvikvm(582): Could not find class 'weka.classifiers.trees.J48', referenced from method edu.usc.student.composure.classifier.GaitClassifierImpl.

与J48是我在code参考类。

with J48 being the class I reference in my code.

有没有人有我可能忽略了任何其他建议?

Does anyone have any additional suggestions that I may have overlooked?

谢谢!

推荐答案

WEKA是行不通的在Android上没有变化。 J48 ,例如,需要 java.lang.Cloneable 接口,这是不是在Android中使用。

WEKA is not going to work on Android without changes. J48, for example, requires the java.lang.Cloneable interface, which is not available in Android.

您需要做的是检查出WEKA源$ C ​​$ C从Subversion,将其添加到您的项目(除去JAR文件),编译它,并修复所有的编译错误。有可能是相当多的这些

What you need to do is check out the WEKA source code from Subversion, add it to your project (removing the JAR file), compile it, and fix all the compile errors. There may be quite a few of these.

这篇关于Android的 - 添加外部库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆