集成ZXing库直接进入我的Andr​​oid应用程序我的、直接进入、应用程序、ZXing

2023-09-11 10:40:11 作者:不贱不开心

我在单纯的绝望写这篇:)我被分配做一个独立的酒吧code扫描仪(作为概念证明)到Android 1.6的手机。

I'm writing this in mere desperation :) I've been assigned to make a standalone barcode scanner (as a proof of concept) to an Android 1.6 phone.

有关这一点,我已经发现了ZXing库。

For this i've discovered the ZXing library.

我GOOGLE了,阅读相关主题在这里计算器中常用的SENCE等等。似乎没有什么帮助,我只是不能冲在这个颏封锁孔:/

I've googled, read related topics here on StackOverflow used common sence and so forth. Nothing seemed to have helped, and i just can't punch a hole on this mentale blockade :/

我知道这是可能的,用lib,并创建自己的独立吧code扫描仪。我读过使用吧code扫描仪由Zxing人提供的,是迄今为止最简单的解决方案(通过意向)。不幸的是,这不是一种选择,和一个独立的应用程序是期望的。

I know it to be possible, to use the lib, and create your own standalone barcode scanner. I've read that using the "Barcode Scanner" provided by the Zxing folks, is by far the easiest solution (via Intent). Unfortunately this is not an option, and a standalone app is desired.

所以,总结一下我的问题:

So to sum up my problem :

如何通过Eclipse的ZXing源lib中融入我的Andr​​oid code项目? 当集成...如何利用lib中,装入扫描功能? 在一步一步的指导,几乎是prefered因为我刚开始在Eclipse中工作。

我试图让我的code项目依赖从ZXing源文件夹Android的文件夹。当我这样做,一个福错误的出现,主要是关于'org.apache'(?)

I've tried to make my code project dependant of the Android folder from the ZXing source folder. When i do so, a handfull errors emerge, mostly concerning 'org.apache' (??)

我只是无法弄清楚......这么几个线索将是最有帮助的。

I just can't figure it out ... so a few hints would be most helpfull.

在前进,谢谢:)

推荐答案

我已经设法弄清楚:)和向下下面你可以阅读一步一步的指导,因此希望能帮助别人,因为我有同样的问题;)

UPDATE! - SOLVED + GUIDE

I've managed to figure it out :) And down below you can read step-by-step guide so it hopefully can help others with the same problem as I had ;)

在安装Apache Ant - (见此YouTube视频的配置说明) 下载从ZXing主页上的ZXing源并提取 通过使用命令行的Windows(运行 - > CMD)的定位到下载 zxing SRC 的根目录。 在命令行窗口 - 类型蚂蚁-f核心/ build.xml文件 preSS输入,让Apache的工作,它的魔力[ having问题是什么? 的] 输入的Eclipse - >新的Andr​​oid项目,基于Android的文件夹的目录,你刚才提取 右键单击项目文件夹 - >属性 - > Java构建路径 - >库 - >添加外部JAR ... 导航到新解压的文件夹,然后打开核心目录,选择 core.jar添加 ...命中进入! Install Apache Ant - (See this YouTube video for config help) Download the ZXing source from ZXing homepage and extract it With the use of Windows Commandline (Run->CMD) navigate to the root directory of the downloaded zxing src. In the commandline window - Type ant -f core/build.xml press enter and let Apache work it's magic [having issues?] Enter Eclipse -> new Android Project, based on the android folder in the directory you just extracted Right-click project folder -> Properties -> Java Build Path -> Library -> Add External JARs... Navigate to the newly extracted folder and open the core directory and select core.jar ... hit enter!

现在你只需要纠正翻译了一些错误,并在AndroidManifest.xml文件:)现在你可以愉快地编译,你现在有一个工作独立吧code扫描仪应用程序的基础上,ZXing源;)

Now you just have to correct a few errors in the translations and the AndroidManifest.xml file :) Now you can happily compile, and you will now have a working standalone barcode scanner app, based on the ZXing source ;)

编程快乐的家伙 - 我希望它可以帮助别人:)

Happy coding guys - I hope it can help others :)