Zxing 2.2导入为库项目(不.JAR)的日食 [英] Zxing 2.2 import as a library project(not .jar) in eclipse

查看:244
本文介绍了Zxing 2.2导入为库项目(不.JAR)的日食的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从下面的链接下载的zxing 2.2 code

的https://$c$c.google.com/p/ zxing /下载/列表

我的要求是要导入的核心项目导入Eclipse,并添加一些code进去。然后将其标记为库项目。

我想包括这个库项目到巴code扫描仪的示例应用程序,并使用从我的项目吧code扫描仪应用程序的库。

解决方案
  

解决

prerequisties下载最新zxing包。

处理1

  1. 创建它eclipse.and名称类似于ZxingCore Java项目。
  2. 复制和粘贴的核心文件夹内完成src文件夹。
  3. 在情况下,你需要编辑任何code,你可以做到这一点。否则跳过此 一步。
  4. 在Java库已准备好使用。

[注:使用Java 1.6编译Java项目,以摆脱运行时异常]

处理2

  1. 在Eclipse中,选择从现有源的Andr​​oid项目。
  2. 在浏览Android的文件夹中的zip文件[这是一个示例项目 bundeled与库]项目应该少进口 错误
  3. 在实际的核心库丢失,我们应该添加ZxingCore 图书馆从工艺1
  4. 右键单击项目 - >属性 - > JavaBuildPath(左窗格) - >项目选项卡 - >添加 - >检查ZxingCore - 确定
  5. 所有的错误应该现在已经没有了。它的时间,使巴code 扫描仪的应用程序是一个库项目
  6. 右键单击项目 - >属性 - >机器人(左窗格) - > 检查isLibrary - >应用 - >确定
  7. 现在,你会得到一些开关case语句错误。转换 问题开关case语句来it..elseif
  8. 您的库项目已准备就绪
  9. 对于那些谁想要运行的吧code扫描仪作为一个独立的应用程序 跳过步骤5,6,7,8

I have downloaded the zxing 2.2 code from the below link

https://code.google.com/p/zxing/downloads/list

My requirement is to import the "core" project into eclipse and add few code into it. then mark it to be library project.

I want to include this library project into barcode scanner sample app and use the barcode scanner app as library from my project.

解决方案

Solved

prerequisties download latest zxing package.

Process 1

  1. create a java project in eclipse.and name it to something like ZxingCore.
  2. copy and paste complete src folder inside core folder.
  3. In case you need to edit any code, you can do it. otherwise skip this step.
  4. Java library is ready to be used.

[Note: Compile Java project using Java 1.6 to get rid of run time exceptions]

Process 2

  1. In eclipse select Create a android project from existing source.
  2. browse your zip file for android folder[this is a sample project bundeled with the library] your project should be imported with few errors
  3. The actual core library is missing, We should add the ZxingCore library from process 1
  4. right click project -> properties -> JavaBuildPath(from left pane) -> project tab -> add -> check ZxingCore - Ok.
  5. All the errors should have gone now. it time to make the barcode scanner app to be a library project
  6. right click project -> properties -> android(from left pane) -> check isLibrary -> apply -> OK.
  7. Now you will get errors in some switch case statements. Convert the problematic switch case statements to it..elseif
  8. Your library project is ready
  9. for those who want to run the barcode scanner as a stand alone app skip the steps 5,6,7,8

这篇关于Zxing 2.2导入为库项目(不.JAR)的日食的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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